1.0.0 • Published 1 year ago
@knoori/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 @knoori/lotide
Require it:
const _ = require('@knoori/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual)
: "Assert whether 2 arrays are equal'function2(assertEqual))
: "Asserts whether 2 values are equal"function3(assertObjectsEqual)
: "Asserts whether 2 objects are equal"function4(countLetter)
: "Returns an object containing the counts of characters in a string"function4(countOnly)
: "returns object containing counts of what input object lists"function5(eqArrays)
: "Returns a boolean value of whether 2 arrays are equal"function6(eqObjects)
: "Returns a boolean value of whether 2 objects are equal"function7(findKeys)
: "Returns a key from an input object based on the callback function provided as an argument"function8(findKeyByValue)
: "Finds a key in an object using a value passed in as an argument"function9(head)
: "Returns the first element in an array"function10(letterPosition)
: "Shows all the index positions of letters in a string passed in as an argument"function11(map)
: "Copy of the map function in the lodash library"function12(middle)
: "Gives the middle values of an array passed in as an argument"function13(tail)
: "Takes an array as an argument, removes the first element and returns the rest of the elements in a new array"function14(takeUntil)
: "Loops through an array and returns all the elements in a new array up until a condition provided by a callback function"function15(without)
: "Takes 2 arrays as arguments and returns a new array containing all elements from the first array, minus the matching elements from the 2nd array"
1.0.0
1 year ago