1.0.1 • Published 4 years ago
@tofi124/lotide v1.0.1
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 @tofi124/lotide
Require it:
const _ = require('@tofi124/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual): compares and asserts two arraysfunction2(assertEqual): compares two given inputs and asserstsfunction3(countLetters): counts instances of that letter in the given wordfunction3(countOnly): count the instances of given names in a given array of namesfunction3(eqArrays): compares two arraysfunction3(eqObjects): compares two objectsfunction3(findkey): returns the key to an object where the number is givenfunction3(findKeyByValue): return the name of the movie in a given generefunction3(flatten): returns flattened arrayfunction3(letterPositions): returns the position of letter in a stringfunction3(map): this will return a new array based on the results of the callback function.function3(map2): Implemention of map 2function3(middle): returns middle of array