1.0.0 • Published 2 years ago
@jshenlive/lotide v1.0.0
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 @jshenlive/lotide
Require it:
const _ = require('@jshenlive/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head(...)
: find the first element of arraytail(...)
: gets the elements in an array without the headmiddle(...)
: gets the middle element/elements of an arraycountLetters(...)
: return an object with number of each letter in give stringcountOnly(...)
: count the number of occurances with given string and arrayfindKey(...)
: find specific key of given object with given callbackflatten(...)
: flattens given nested arrayletterPositions(...)
: returns object with letter positions of given stringmap(...)
: maps given array with given callback functiontakeUntil(...)
: take elements of given array until specifics given by callbackwithout(...)
: return an array without the given elements in the given array
1.0.0
2 years ago