1.0.0 • Published 2 years ago
@dwayne-jagernauth/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 @dwayne-jagernauth/lotide
Require it:
const _ = require('@dwayne-jagernauth/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual.js)
: compares two arrays, displays message depending on if they are the same or differenfunction2(assertEqual.js)
: asserton part of assertArraysEqual - assertArraysEqual depends on assertEqualfunction3(assertObjectsEqual.js)
: compares objects and displays message depending if same or not, requires eqObjects.jsfunction4(countLetters.js)
: counts the letters but not the spaces in a phrase without punctuationfunction5(eqArrays.js)
: compares two arrays to see if they are the same or not - required by assertArraysEqual.jsfunction6(eqObjects.js)
: compares to objects as above, requires eqArrays, is required by assertObjectsEqualfunction7(findKey.js)
: declares the name of a key or not found if it is found in an object, takes in a callback functionfunction8(findKeyByValue.js)
: finds the name of a key in an object given the corresponding valuefunciton9(head.js)
: returns the first element of an arrayfunction10(letterPositions.js)
: returns an array of arrays with the letter position of different letters in an unpunctuated sentencefunction11(map.js)
: returns the first letter of each word in an arrayfunction12(middle.js)
: returns the middle items of arrays of length > 3, will return the middle two for arrays of even lengthfunction13(tail.js)
: returns the elemtents of an array except the first elementfunction14(takeUntil.js)
: returns the elements of an array up to element returned by callback funtionfunction15(without.js)
: removes given elements from an array
1.0.0
2 years ago