@coconuttt/lotide

1.0.1 • Public • Published

A Lodash library dumber clone

Status
🦖 - codes are king of the jungle (max improvement of my abilities)
👾 - codes need a bit of touch up to be fab
🔥 - codes are in crisis or I don't know why but it runs

Function Files

  1. head - return the 1st element of an array | 🦖
  2. middle - return an array of the middle value of an array |
  3. tail - return everything behind the head | 👾
  4. map - self-implemented map (return an array results) | 👾
  5. takeUntil - slice the array until meet the condition to stop and return an array of those elements | 🦖
  6. without - return a new array with unwanted elements are removed (not support nested array as an elements)| 🦖
  7. countOnly - return an obj with the numbers of appearances of the letter in the string | 🦖
  8. countLetters - return an obj of the appearance of the letter in the string | 👾
  9. letterPositions - return an obj of the position of letters in the string | 👾
  10. findKey - using callback to improve
  11. findKeyByValue - return the key that match the value in the obj | 🦖
  12. eqArrays - check === of 2 arrays (not support nested array as an elements) and return true/false | 👾
  13. eqObjects - check === of 2 objects and return true/false | 🔥 not return correct output

Test Files

Assert functions

  1. assertEqual - console.log the message of test cases for 2 values | 🦖
  2. assertArraysEqual - console.log the message of test cases for 2 arrays | 🦖
  3. assertObjectsEqual - console.log the message of test cases for 2 objectst | 🦖

Test cases

To run all 'chai' tests: npm test To run specific test: npm test test\test_file_name

  1. headTest - test cases for head
  2. middleTest - test cases for middle
  3. tailTest - test cases for tail
  4. mapTest - test cases for map
  5. takeUntilTest - test cases for takeUntil
  6. withoutTest - test cases for without
  7. countOnlyTest - test cases for countOnly
  8. countLettersTest - test cases for countLetters
  9. letterPositionTest - test cases for letterPosition
  10. findKeyTest - test cases for findKey
  11. findKeyByValueTest - test cases for findKeyByValue
  12. eqArraysTest - test cases for eqArray
  13. eqObjectsTest - test cases for eqObjects
  14. assertArraysEqualTest - test cases for assertArraysEqual
  15. assertObjectsEqualTest - test cases for assertObjectsEqual

For exporting all Lotide functions

  1. index - files to return an object contains entire Lotide functions

Readme

Keywords

none

Package Sidebar

Install

npm i @coconuttt/lotide

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

28.8 kB

Total Files

34

Last publish

Collaborators

  • coconuttt