@coconuttt/lotide v1.0.1
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
- head - return the 1st element of an array | 🦖
- middle - return an array of the middle value of an array |
- tail - return everything behind the head | 👾
- map - self-implemented map (return an array results) | 👾
- takeUntil - slice the array until meet the condition to stop and return an array of those elements | 🦖
- without - return a new array with unwanted elements are removed (not support nested array as an elements)| 🦖
- countOnly - return an obj with the numbers of appearances of the letter in the string | 🦖
- countLetters - return an obj of the appearance of the letter in the string | 👾
- letterPositions - return an obj of the position of letters in the string | 👾
- findKey - using callback to improve
- findKeyByValue - return the key that match the value in the obj | 🦖
- eqArrays - check === of 2 arrays (not support nested array as an elements) and return true/false | 👾
- 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 assertObjectsEqualFor exporting all Lotide functions 32. index - files to return an object contains entire Lotide functions