1.0.0 • Published 5 years ago
@siriusll/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 @username/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(head): returns value of first element in an arrayfunction2(tail): returns a new array with everything except the first elementfunction3(middle): returns the middle element value of an array, if even 2 middle values if odd 1 middle value if 1 or 2 characters empty arrayfunction4(assertArraysEqual): returns true of false whether 2 arrays are equalfunction5(assertEqual): returns true or false if two values are equalfunction6(assertObjectsEqual)returns true or false if two objects are equalfunction7(countLetters)returns number of letters in a stringfunction8(eqArrays)returns true or false if two arrays are equalfunction9(eqObjects)returns true of false if two objects are equalfunction10(findKey)returns a key when provided a conditionfunction11(findKeyByValue)returns a key when provided a key valuefunction12(letterPositions)returns the positions of each letter in an arrayfunction13(takeUntil)returns an new array with the end sliced off starting from a sepcified start pointfinction14(without)returns a new array without a secified element
1.0.0
5 years ago