Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kimwj0318/lotide

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kimwj0318/lotide

his project was created and published by me as part of my learnings at Lighthouse Labs

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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 and had little assistance from @ScottRoberts0 during refactoring and creating index.js while paired up for pair programming.

Usage

Install it:

npm install @kimwj0318/lotide

Require it:

const _ = require('@kimwj0318/lotide');

Call it:

const results = _.tail([1, 2, 3]) // => [2, 3]

Documentation

The following functions are currently implemented:

  • head : given an array, get the first element within the array
  • tail : given an array, return an array without the first element of the original array
  • middle : given an array, return the elements in the middle of the array
  • assertArraysEqual : given two arrays, evaluate if they are equal or not
  • assertEqual : given two inputs, evaluate if they are equal or not
  • assertObjectsEqual : given two objects, evaluate if they are equal or not
  • countLetters : given a string,create an object with letters as keys which equate to values indicating how many the letter appears in the string
  • countOnly : given an array of items and an object referring to what should be counted, count how many times the object element occurs in the array of items
  • eqArrays : given two arrays, check if they are equal
  • eqObjects : given two objects, check if they are equal
  • findKey : given an object and a condition, find the key where the value satisfies the condition
  • findKeyByValue : given an object and a value, find the key corresponding to the value
  • flatten : given a nested array, remove all nested arrays
  • letterPositions : given a string, return an object indicating the index of all the letters in the string
  • map : given an array and a condition, modify each element to fulfill the given condition
  • takeUntil : given an array and a condition, create a new array with the elements starting from index[0] of the original array until a certain element does not satisfy the condition provided.
  • without : given two arrays, modify array 1 to remove all elements that are in both array 1 and array 2

FAQs

Package last updated on 29 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc