1.0.0 • Published 4 years ago
@tenzin.lhawang/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('@tenzin.lhawang/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
- assertArraysEqual: checks if two arrays are equal
- assertEqual: checks if two values are equals
- assertObjectsEqual: checks if two objects are equals
- countLetters: counts the number of letters in a string
- countOnly: Receives elements and counts the specific subset of those elements
- eqArrays: compares two arrays
- eqObjects: compares two objects
- findKey: traverses through the object and returns the first key for which the callback returns a truthy value
- findKeyByValue: traverses through object for a key whose value matches the value given(input)
- head: returns the first element of the array
- index: list or index of all functions in an object syntax
- letterPositions: returns all the indices in the string where each character is found map: middle: tail: takeUntil: without:
1.0.0
4 years ago