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 @/lotide
Require it:
const _ = require('@notayogilee/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function head(...): returns the first element in an arrayfunction tail(...): returns every element in an array except for the first elementfunction middle(...): returns the middle element(s) of an arrayfunction map(...): given an array of strings, returns the first letter of each string in a new array of stringsfunction letterPositions(...): given a string, returns an object of letters as keys and their corespondingfunction flatten(...): given an array of arrays with numbers, returns one array with the same numbersfunction findKeyByValue(...): given an object and value, returns the corresponding keyfunction findKey(...): given an object of strings for keys and objects for values and one of the value objects, return corresponding keyfunction countOnly(...): given a string returns how many instances of the string occursfunction countLetters(...): given a string of letters, returns an object with key as letter found in string and value as number of times foundfunction takeUntil(...): given an array and a limiting factor, returns array until limiting factor is foundfunction without(...): given an array of elements and an array of element to remove from first array, returns modified array