lotide
javascript library project
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 @lord-proton/lotide
Require it:
const _ = require('@lord-proton/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
-
function head
: returns index[0] element fm array -
function tail
: returns array with index[0] element removed -
function middle
: returns midde element(s) from array -
function assertArraysEqual
: returns t/f for arr 1 === arr 2 -
function countLetters
: counts all letters in a string -
function countOnly
: counts specified items in array as directed -
function eqArrays
: determines if 2 arrays have same content -
function eqObjects
: determines if 2 objects have same key:value pairs -
function findKey
: returns the keys contained in an object -
function findKeyByValue
: returns the keys by using values in object -
function letterPositions
: returns object giving index positions of each letter -
function takeUntil
: func pulls data from array until callback cond is met -
function without
: func removes array elements based on callback condition