{"_id":"@bwong.yh/lotide","_rev":"4-d6a1c27568611f5382d79f4413d43ac0","time":{"created":"2022-04-15T13:25:55.145Z","1.0.0":"2022-04-15T13:15:03.372Z","modified":"2022-04-15T23:43:19.753Z","1.0.1":"2022-04-15T13:25:55.358Z","1.0.2":"2022-04-15T23:43:19.670Z"},"name":"@bwong.yh/lotide","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@bwong.yh/lotide","version":"1.0.1","description":"This is the very first project from the Web Development Flex Program at Lighthouse Labs! It is a simpler and smaller version of the [Lodash](https://github.com/lodash/lodash) library.","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bwong-yh/lotide.git"},"author":{"name":"Billy Wong","email":"bwong.yh@gmail.com","url":"https://github.com/bwong-yh"},"license":"ISC","bugs":{"url":"https://github.com/bwong-yh/lotide/issues"},"homepage":"https://github.com/bwong-yh/lotide#readme","devDependencies":{"chai":"^4.3.6","mocha":"^9.2.2"},"gitHead":"612f47d5fc6582355df2ac550ff54b4f27f42a98","_id":"@bwong.yh/lotide@1.0.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-U54HWdhN0Dfa/nXw8kkacKmGSNj5WN2eZtwsTd+PKAwDP6b2lEhvi8b47XbXxqYvnS3nVKpgN3kZjFFIT4sA0A==","shasum":"78ef582518ccc2fe3c21b29e0802fa66bafebcf3","tarball":"https://registry.npmjs.org/@bwong.yh/lotide/-/lotide-1.0.1.tgz","fileCount":35,"unpackedSize":19369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBk8MUnExQXUKDtaF09lngS9zVnPsXmWMy8TgMhsOVamAiEAjNmSNuXfBAYRbyW+/5bebZjDCwT6pfACNbYaY+Jg6UA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWXJjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAPw/9GhHnpJ8x1vFvI23ZwREknX9NYIcgnd0dCF9uZr5kHvPFd0mS\r\nWw3+zWF5FhrRKrWhaK8pD2t5KPAmcmT8Ck2xpe6C1WGftn2A2VHPbY+zN6EG\r\nVrzWbVQw2mLM1L01XkdW2NqMeFZcuwizyFXDMZGVhwcbZTk7p1EAVxNfDgiu\r\n8+oMhK1guiz+FTdT4Oy95VETDp6nW9FitmEYY0o1Ef+Pg4+X3SmQ7o2n71SF\r\nNf4SOrIvV3AU8/k/qEXGqVRkzF5PxfwLsN8gM3jdCTK1pz0LpjUBELrIKzCy\r\njGv2biLweVIjtBae/gTlHNDYkTbAqG3ADgGgjz39mUP+IRc1EIOzyUJogvCX\r\nZDx3H+ps6JwXZrVMSYHOxXOpvs7HjOzEC/Lhl/Jj7p6TEAJ96JgbKnTvmNJn\r\ngMaXHVRqkxKiTAcz8HpSjLp4ss/M3zzWAR/hJbxjevhKexcvOUIfOc4Ud8N8\r\nMI5nENQ3HFPaVVVwYwbnozoDDL3oXW8P548yjPJf//bL24bYpgwkwulQ8Q/V\r\npu5pFv9BmLOspCz4MSjKjuVG6tcQEmt5ZI6Lr/NWziRAtrIitcOfFA8TH/IH\r\n4xZZbXLanb/GgSXXjJq+y287oowK8+qLrrU4gTLr8azFOzEjHDN+sRwXdfVc\r\nvEmizZSXJ24h4yqGxABvrq8aRt+WDSddh54=\r\n=j3x0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bwong.yh","email":"bwong.yh@protonmail.com"},"maintainers":[{"name":"bwong.yh","email":"bwong.yh@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lotide_1.0.1_1650029155203_0.7700527570132951"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bwong.yh/lotide","version":"1.0.2","description":"This is the very first project from the Web Development Flex Program at Lighthouse Labs! It is a simpler and smaller version of the [Lodash](https://github.com/lodash/lodash) library.","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bwong-yh/lotide.git"},"author":{"name":"Billy Wong","email":"bwong.yh@gmail.com","url":"https://github.com/bwong-yh"},"license":"ISC","bugs":{"url":"https://github.com/bwong-yh/lotide/issues"},"homepage":"https://github.com/bwong-yh/lotide#readme","devDependencies":{"chai":"^4.3.6","mocha":"^9.2.2"},"gitHead":"19927104234326c6236cc38710708ff772c1e6b6","_id":"@bwong.yh/lotide@1.0.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-C4nW80zeC+J82xqZOjwpfhRNv27HI2EEnuR3tJYUvnFKJrWx7Fq524XMDZvqasU0xEq1J74bXIV/9Riu2nWdzw==","shasum":"18aeba02ce61f338822c25586af730bf7e308b61","tarball":"https://registry.npmjs.org/@bwong.yh/lotide/-/lotide-1.0.2.tgz","fileCount":35,"unpackedSize":20970,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF+hTvbDIjSitpmX3y8H/JhV4OcdWReL9U+6oWAscS5JAiEAu+H8uvYuaYFBIbdfeUNuS3oJgqjRSx9tNDZZE6yvwCs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWgMXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoj7g/+O3cLpCYnbhE/usmTfwktWIhm4kuj4hDDDxdJoiHh/+RiSUgQ\r\neY3F+TIKIppYWhx8Fhc4qZZv0vPRxuLGkHpKuP7NOIyjO7OVheBOfFPzwyeT\r\naK6EKvsTA1JUSYHjTaPNEWTLx72Ii1FamMDvOKTS5+SJMmAAPznUAAclHcTB\r\nOc2t+sTkZ2JNubX08byy8UniCv/bFaUjjC0Lm/EGgi9P0hEwCEDKNclPnfED\r\n1rpbr/89antSZBa0qIEqxqwIilLTu42P1DeMYF31LPPImJeFpXi/S2koAeJq\r\n2q6slXsogwCzuF/Zi3+ZdfRsienJIyPsL3arYGrQIlN5of+4CHuwmKvDhX2l\r\nj8jEFm1ngtAhTTtaqtZA4lrfPe/4wmM+d0jddg1Jl3l8MjJ84cG/XgU74SUc\r\nn6L9zIpOsDtwawYNEPJijwfsyi2c7hN/32hgDZgbRtP6hbXoL9d2ni/Ssifa\r\nhP2YXSCumJVtYhXYEDkdtN3FxGOVThmho5u9FjB0cvSyIpLUmoG2wrCsbMRK\r\n6qKWKy+xFX/Ue8eyVtZKLPMmxmBa07pEDXxWSPTZAXjYClfJFopYKMBNMeo+\r\nCswW0m1E9TAlZHbazE+jfeGKUk3frToyfixfDQ7j6MeKFlZ08jP412Xj18P7\r\nkN/5iVVjHuFvAVozf5T9BiZwd8t3/48V36w=\r\n=PdIH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bwong.yh","email":"bwong.yh@protonmail.com"},"maintainers":[{"name":"bwong.yh","email":"bwong.yh@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lotide_1.0.2_1650066199521_0.7241258776942463"},"_hasShrinkwrap":false}},"maintainers":[{"name":"bwong.yh","email":"bwong.yh@protonmail.com"}],"description":"This is the very first project from the Web Development Flex Program at Lighthouse Labs! It is a simpler and smaller version of the [Lodash](https://github.com/lodash/lodash) library.","homepage":"https://github.com/bwong-yh/lotide#readme","repository":{"type":"git","url":"git+https://github.com/bwong-yh/lotide.git"},"author":{"name":"Billy Wong","email":"bwong.yh@gmail.com","url":"https://github.com/bwong-yh"},"bugs":{"url":"https://github.com/bwong-yh/lotide/issues"},"license":"ISC","readme":"# Lotide\n\nA mini clone of the [Lodash](https://lodash.com) library.\n\n## Purpose\n\n**_BEWARE:_ This library was published for learning purposes. It is _not_ intended for use in production-grade software.**\n\nThis project was created and published by me as part of my learnings at Lighthouse Labs.\n\n## Usage\n\n**Install it:**\n\n`npm install @bwong.yh/lotide`\n\n**Require it:**\n\n`const _ = require('@bwong.yh/lotide');`\n\n**Call it:**\n\n`const results = _.tail([1, 2, 3]) // => [2, 3]`\n\n## Documentation\n\nThe following functions are currently implemented:\n\n- `assertEqual(arg1, arg2) {}`: takes two primitive data arguments and does a strict comparsion between them, then logs the assertion result in the console.\n\n- `assertArraysEqual(arr1, arr2) {}`: similar to assertEqual, except it takes two arrays, does a strict comparsion of elements in both arrays and logs assertion result in the console.\n\n- `assertObjectsEqual(obj1, obj2) {}`: takes two objects and does a strict comparsion of the properties in both objects and logs the assertion result in the console.\n\n- `countLetters(str) {}`: takes a string arguement and returns the counts of each letter in the string.\n\n- `countOnly([a, b, b], {a: true, b: false}) {}`: takes an array as first arguement and an object as second argument. Then returns the counts for the element in the array that specified in the object.\n\n- `eqArrays(arr1, arr2) {}`: takes two arrays and compares their elements. It returns _true_ if the elements are the same, and _false_ if different. **_This is used for arrays containing the SAME data type. It will NOT work with mixed data types arrays._**\n\n- `eqObjects(obj1, obj2) {}`: takes two objects and compares the properties in both objects. It returns _true_ if properties are the same in both objects, and _false_ if different. **_Please see eqArrays if property has an array as value._**\n\n- `findKey(obj, callback) {}`: takes an object and a callback function and returns the first key for the truthy value that the callback returned. _Undefined_ is returned if no key is found.\n\n- `findKeyByValue(obj, arg) {}`: takes in a value of an object and returns the first key that contains the value.\n\n- `flatten(nestedArr) {}`: takes in an nested array and returns a \"flattened\" single-level array.\n\n- `head(arr) {}`: takes an array and returns the first element of the array.\n\n- `letterPositions(str) {}`: takes a string argument and returns the index position of each letter in the string.\n\n- `map(arr, callback)`: takes an array and callback function and returns a new array based on the the conditions specified in the callback.\n\n- `middle(arr) {}`: takes an array and returns the middle element of the array. If the lenght of array is even, it returns the middle two elements of the array.\n\n- `tail(arr) {}`: takes an array and returns a new array with elements start from the first position of the original array.\n\n- `tailUntil(arr, callback) {}`: takes an array and a callback function and returns a new array with elements collected from the original array until callback returns truthy.\n\n- `without(arr1, arr2) {}`: takes two arrays, source array and exclusion array (elements to be removed) respectively. A new array is returned with elements from the source array that are NOT in the exclusion array.\n","readmeFilename":"README.md"}