Package Exports
- @tackpablo/lotide
- @tackpablo/lotide/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tackpablo/lotide) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Lotide
A mini clone of the Lodash library.
Purpose
BEWARE: This library was published for learning purposes. It is not intended for use in production-grade software.
This project was created and published by me as part of my learnings at Lighthouse Labs.
Usage
Install it:
npm install @tackpablo/lotide
Require it:
const _ = require('@tackpablo/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(head): gets the first element of arrayfunction2(tail): gets the last element of arrayfunction3(middle): gets the middle element of arrayfunction3(assertArraysEq): asserts if 2 arrays are equalfunction3(assertEqual): asserts if two values are equalfunction3(assertObjectsEqual): asserts if 2 objects are equalfunction3(countLetters): counts each letter of stringfunction3(countOnly): takes elements of arrays and counts their amountfunction3(eqArrays): compares 2 arraysfunction3(eqObjects): compares 2 objectsfunction3(findKey): returns first element key that meets the condition of callback functionfunction3(findKeyByValue): returns element key that meets specified valuefunction3(flatten): flattens nested arrays into a single level arrayfunction3(letterPositions): returns all indices where specific is element foundfunction3(map): returns new array with results of callback functionfunction3(takeUntil): returns slice of an array with elements taken from the beginningfunction3(without): removes element from an array