1.0.1 • Published 5 years ago
@pkang2/lotide v1.0.1
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 @pkang2/lotide
Require it:
const _ = require('@pkang2/lotide/index');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(array1,array2): compares array and console logs ture or falseassertEqual(actual,expected): compares strings and console logs true or falseassertObjectEquals(obj1,obj2): compares objects and console logs true or falsecountLetter(string): returns number of times each letter shows up in a stringcountOnly(array,element): returns count of element in arrayeqArrays(array1,array2): compares array and returns logs ture or falseeqObjects(obj1,obj2): compares objects and returns logs true or falsefindKey(obj,callbackfcn): returns key on call back functionfindKeyByValue(obj,string): returns key by valuehead(array1): returns array10letterPosition(string): returns object with postions of lettersmap(array,callbackfcn): returns array with function applied to each elementmiddle(array): returns the middle element/s of an arraytail(array): returns an array without the first elementtakeUntil(array,callbackfcn): returns an array that terminates at specifed elementwithout(array,remove): returns an array with removed specified elements