@chen.liang/lotide

mini lodash project

Usage no npm install needed!

<script type="module">
  import chenLiangLotide from 'https://cdn.skypack.dev/@chen.liang/lotide';
</script>

README

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 @chen.liang/lotide

Require it:

const _ = require('@chen.liang/lotide');

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(head): head of the array
  • function2(tail): tail of the array
  • function3(middle): middle of the array
  • function4(without): without words within the array
  • function5(flatten): flatten out arrays
  • function6(countOnly): conditional counting
  • function7(countLetters): counting how many letters
  • function8(findKeyByValue): finding the position by the value
  • function9(letterPosition): what position of the letter
  • function10(takeUntil): up until a selector
  • function11(map): mapping the first letter
  • function12(findKey): finding characters
  • function13(assertArraysEqual): test case of arrays
  • function14(assertEqual): test case
  • function15(assertObjectsEqual): test case for objects
  • function16(eqArrays): comparing arrays
  • function17(eqObjects): comparing objects