@tonya_chi/lotide
v1.0.0
Published
Useful function from newby
Downloads
2
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 @tonya_chi/lotide
Require it:
const _ = require('@tonya_chi/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(...)
: descriptionfunction2(...)
: descriptionfunction3(...)
: descriptionhead(),
: function returns first element from an arraytail(),
: function returns last element from an arraymiddle(),
: function returns middle element/elements from an arrayeqArrays(),
: function returns true or false after comparing two arrayseqObjects(),
: function returns true or false after comparing two objectscountOnly(),
: function returns how many times the item contains in an arraycountLetters(),
: function returns how many times the letter contains in a wordfindKey(),
: function returns key by name with callback functionfindKeyByValue(),
: function returns key by value with callback functionletterPosition(),
: function returns index of all letters in an arraymap(),
: function returns first letter of words in an arraytakeUntil(),
: function returns slice of an array with callback function as a conditionwithout()
: function returns slice of an array without passing parameter