1.0.0 • Published 5 years ago
@kradaev/lotide v1.0.0
Kirill's Notes
Summary
This repository contains all of the notes takem by Kirill Radaev for the Lighthouse Labs Web Development Bootcamp.
Table of Contents
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 @kradaev/lotide
Require it:
const _ = require('@kradaev/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head
: returns the head of an arraytail
: returns everything except the first elemnt from an arraymiddle
: returns everything between the first ad last index in an arrayeqArrays
: compares two arraysassertEqual
: prints out the reluts if true or falseassertArraysEqual
: logs true or false if arrays are equalassertObjectsEqual
: logs true or false if arrays are equaleqObjects
: checks if two objects are equalfindKey
: finds key in an objectfindKeyByValue
: finds key by its value in an objectflatten
: takes nested arrays and groups them into one arraycountOnly
: counts and returns only specific keysletterPosition
: returns the positon of a lettermap
:returns only specific indeciestakeUntil
: returns obly objects in an array that are before specific objectwithout
: checks two arrays and removes identical objects in both arrays
1.0.0
5 years ago