1.0.1 • Published 2 years ago

@coconuttt/lotide v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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 14. assertEqual - console.log the message of test cases for 2 values | 🦖 15. assertArraysEqual - console.log the message of test cases for 2 arrays | 🦖 16. 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 17. headTest - test cases for head 18. middleTest - test cases for middle 19. tailTest - test cases for tail 20. mapTest - test cases for map 21. takeUntilTest - test cases for takeUntil 22. withoutTest - test cases for without 23. countOnlyTest - test cases for countOnly 24. countLettersTest - test cases for countLetters 25. letterPositionTest - test cases for letterPosition 26. findKeyTest - test cases for findKey 27. findKeyByValueTest - test cases for findKeyByValue 28. eqArraysTest - test cases for eqArray 29. eqObjectsTest - test cases for eqObjects 30. assertArraysEqualTest - test cases for assertArraysEqual 31. assertObjectsEqualTest - test cases for assertObjectsEqual

For exporting all Lotide functions 32. index - files to return an object contains entire Lotide functions