1.0.0 • Published 4 years ago
@brandon_r/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(assertArraysEqual): checks if arrays are equalfunction2(assertEqual): checks if two values are equal, cannot compare objectsfunction3(assertObjectsEqual): checks if two objects are equalfunction4(countLetters): counts the letters in a stringfunction5(countOnly): counts the instances of a certain char in a stringfunction6(eqArrays): compares two arrays for equalityfunction7(eqObects): compares two objects for equalityfunction8(findKey): checks if a key is present and wherefunction9(findKeyByValue): looks for a defined keyfunction10(head): returns the first element of an arrayfunction11(letterPositions): finds a letters positionfunction12(map): applies a function to each element in an arrayfunction13(middle): returns the middle element of an arrayfunction14(tail): returns all elements of an array after the firstfunction15(takeUntil): returns all chars until a specified char in a stringfunction16(without): removes specified elements from a string
1.0.0
4 years ago