1.0.0 • Published 4 years ago
@carterhem/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 @carterhem/lotide
Require it:
const _ = require('@carterhem/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual): asserts if two arrays are equalfunction2(assertEqual): asserts if items are equalfunction3(assertObjectsEqual): asserts if two Objects are equalfunction3(countLetters): counts the letters in a stringfunction3(countOnly): counts only the specified items from the second item in the firstfunction3(eqArrays): checks if arrays are equalfunction3(eqObjects): checsk if objects are equalfunction3(findKey): scans object and returns first key where callback finds truthy valuefunction3(findKeyByValue): scans object and returns first key with given valuefunction3(head): returns head of arrayfunction3(letterPosition): retunrs all the indices in a string where each character is foundfunction3(map)): creates new array with results of function called on original arrayfunction3(middle): pulls middle of even or odd arrayfunction3(tail): returns tail of arrayfunction3(takeUntil): returns array with values up until given valuefunction3(without): makes new array with items specified removed
1.0.0
4 years ago