{"_id":"@bushra.patel/lotide","name":"@bushra.patel/lotide","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bushra.patel/lotide","version":"1.0.0","description":"JavaScript Lotide Library for working with arrays, numbers, objects, strings, etc","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bushrapatel28/lotide.git"},"author":{"name":"Bushra Patel"},"license":"ISC","bugs":{"url":"https://github.com/bushrapatel28/lotide/issues"},"homepage":"https://github.com/bushrapatel28/lotide#readme","devDependencies":{"chai":"^4.3.1","mocha":"^9.2.2"},"gitHead":"cd2d2e5f82d315ff9bd2ffb54196466a7f859a4b","_id":"@bushra.patel/lotide@1.0.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-UaLbipqgc+yAsH16oK9WRGMKqrZq/K/YArdKsxrrjAkQJ6PoubPoU7DVLlxURNqm7nvqDPWfKl7cClceZz+8hQ==","shasum":"93d2f78589da443af8425e5889c0ed207f8cb326","tarball":"https://registry.npmjs.org/@bushra.patel/lotide/-/lotide-1.0.0.tgz","fileCount":27,"unpackedSize":22565,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWhpvGO+/62O0Y3HggmaRMEirCJX39L1iLv/qz/T26sAiEAoi04uZnOY1E+hkmKUNBFKPa3G+6nxNaLYSyAC03SdEU="}]},"_npmUser":{"name":"bushra.patel","email":"bpatel60@yahoo.com"},"maintainers":[{"name":"bushra.patel","email":"bpatel60@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lotide_1.0.0_1713058554775_0.7511442561911774"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-14T01:35:54.653Z","1.0.0":"2024-04-14T01:35:54.931Z","modified":"2024-04-14T01:35:55.267Z"},"maintainers":[{"name":"bushra.patel","email":"bpatel60@yahoo.com"}],"description":"JavaScript Lotide Library for working with arrays, numbers, objects, strings, etc","homepage":"https://github.com/bushrapatel28/lotide#readme","repository":{"type":"git","url":"git+https://github.com/bushrapatel28/lotide.git"},"author":{"name":"Bushra Patel"},"bugs":{"url":"https://github.com/bushrapatel28/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 @bushra.patel/lotide`\n\n**Require it:**\n\n`const _ = require('@bushra.patel/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- `head(arr)`: Returns the first item in the array.\n- `tail(arr))`: Returns the \"tail\" of an array: everything except for the first item (head) of the provided array.\n- `middle(arr)`: Returns the middle-most element(s) of the given array.\n- `flatten(arr)`: Returns a \"flattened\" version of the array (including nested arrays).\n- `without(source, itemsToRemove)`: Returns a subset of a given array, removing unwanted elements.\n- `takeUntil(array, callback)`: Keeps collecting items from a provided array until the callback provided returns a truthy value.\n- `map(array, callback)`: Returns a new array based on the results of the callback function.\n- `countOnly(allItems, itemsToCount)`: Returns an object containing counts of everything that the input object listed.\n- `countLetters(sentence)`: Returns a count of each of the letters in that sentence.\n- `letterPositions(sentence)`: Returns all the indices (zero-based positions) in the string where each character is found.\n- `findKeyByValue(objectToScan, value)`: Returns the first key which contains the given value. If no key with that given value is found, then it should return undefined.\n- `findKey(objectToScan, callback)`: Returns the first key for which the callback returns a truthy value. If no key is found, then it should return undefined.\n- `assertEqual(actual, expected)`: Compares the two values it takes in and print out a message telling us if they match or not.\n- `eqArrays(array1, array2)`: Returns true or false, based on a perfect match.\n- `assertArraysEqual(array1, array2)`: Prints (console.log) an appropriate message to the console.\n- `eqObjects(object1, object2)`: Returns true or false, based on a perfect match.\n- `assertObjectsEqual(actual, expected)`: Prints (console.log) an appropriate message to the console.","readmeFilename":"README.md"}