{"_id":"@alan-marx/lotide","_rev":"1-05f32a6a06598f8c818066279d2cd711","name":"@alan-marx/lotide","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alan-marx/lotide","version":"1.0.0","description":"a utility library inspired by Lodash created for learning purposes","main":"assertArraysEqual.js","directories":{"test":"test"},"dependencies":{"chai":"^4.2.0"},"devDependencies":{"mocha":"^7.1.0"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/Alan-Marx/lotide.git"},"author":{"name":"Alan Marx"},"license":"ISC","bugs":{"url":"https://github.com/Alan-Marx/lotide/issues"},"homepage":"https://github.com/Alan-Marx/lotide#readme","gitHead":"be3beae2a5c5642337b762ea3aff55ef3809f1ba","_id":"@alan-marx/lotide@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"alan-marx","email":"alanmarx@hotmail.com"},"dist":{"integrity":"sha512-7iMpf0OQn4Dj9qNWL+hH1zsl3u34Cuxh3bdOKZKTg7SnOW1mGrfuJZkz3aQ9EJcUN8sUC/J1ywiZWmJvKdm67Q==","shasum":"f77f38b7f0e555838b7b3820e5b3a07f89f67829","tarball":"https://registry.npmjs.org/@alan-marx/lotide/-/lotide-1.0.0.tgz","fileCount":26,"unpackedSize":21803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZskOCRA9TVsSAnZWagAA0q8QAJvDgYjbIIwYkzSa8meP\naT3GV5Rb3jpbPj154EBq34nQX+gVHU7VeJlWQ/VSb8aU1WmQN9uaAPVj+ft8\n4VbG30lQjVKRxxDq0jxNlJcs5GY9FkcukWWtX57YPipoPTKv0HKQ9E/Ho9ik\ny3ZuM60ech75gcd3ZhNCVPkYCfe6qBbS5wH1CMDpvQr1sHkhg378tha7jCMY\narQ897RsT4FgFzclC+FJAGATeJw4FMmdZ7puAD79G7aVss+LujPSjRMN/IQG\n+s/WRKFVYeHNxUvh7+DBMgTAX3CjxMs/80Nbo3+xiqFu/YeYX8gF5PYL/z+d\nev+DWQB9dAzI5AR7oVIoqafLO/weKa8Q1NUoKmqShkXVl7WrkwwfGOX54+Qm\nmzD7A4Yt76YEvAz79hdUiEKvMFcQ55a9YdvzrYP82+LsoLLIz1APkA/uCBiz\nh5hW8+HAxs8bsKc65g7D/bxNztF8fgOpBPHLKRyDEGxlGEuKzUGVKwatBx33\nkRODeFArypHh6836hWe7pdZstnqzlinRFJh4xgZPtK/ND8kqkcbD9M5REWlZ\n9164hUFcvNW22RUr38BSrzzus6nYVxogkz6u1+7FNJepkec3DgmRLUEmgDRN\nIIy3rxElDdALZ7cgnCgEW6v/ThHKLOlueqeEjtRZPsyNnGdJwCKyQ7l9PbNZ\nrnky\r\n=R7KA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsDgwfgwOaUs9U/5T8DH8lKXeZETTq9b0b+HuFos/TjAiAN/PR0+YINisHgcBsTgydVlvRjDhce/0RSWpxUZMaQxw=="}]},"maintainers":[{"name":"alan-marx","email":"alanmarx@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lotide_1.0.0_1583794446265_0.07268072834252903"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-09T22:54:06.018Z","1.0.0":"2020-03-09T22:54:06.427Z","modified":"2022-04-04T12:32:54.969Z"},"maintainers":[{"name":"alan-marx","email":"alanmarx@hotmail.com"}],"description":"a utility library inspired by Lodash created for learning purposes","homepage":"https://github.com/Alan-Marx/lotide#readme","repository":{"type":"git","url":"git+https://github.com/Alan-Marx/lotide.git"},"author":{"name":"Alan Marx"},"bugs":{"url":"https://github.com/Alan-Marx/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 @alan-marx/lotide`\n\n**Require it:**\n\n`const _ = require('@alan-marx/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(array)`: Returns the first element of an array\n* `tail(array)`: Returns the tail (all elements after head) of an array\n* `middle(array)`: Returns the middle element of an array with an odd number of elements or the two middle elements for an even number\n* `countLetters(string)`: Returns an object with keys for each letter in the input string and values for the number of occurance for each letter \n* `countOnly(allItems, itemsToCount)`: allItems: an array of strings that we need to look through; itemsToCount: an object specifying what to count; Returns an object with the items specified in the itemsToCount parameter with occurance values\n* `eqArrays(array1, array2)`: Returns true if both array arrguments contain the same values; false otherwise\n* `eqObjects(object1, object2)`: Returns true if both object arguments contain the same key: value pairs\n* `findKey(object, callback)`: Higher-order function that accepts an object and a callback function. Will call callback function on each object value and return the key of the first value which is true via the callback function.\n* `findKeyByValue(object, searchValue`: Will return the key of the object property that has a value matching the searchValue parameter.\n* `flatten(array)`: Takes in an array with nested arrays as an argument and returns a flattened array composed of every individual element in each array.\n* `letterPositions(string)`: Takes in a string as an argument and returns an object with a key for every letter present in the string paired with an array listing the various index positions of each particular letter in the string.\n* `map(array, callback)`: Takes in an array and a callback function and returns a new array with the results of passing every array item through the function.\n* `takeUntil(array, callback)`: Takes in an array and a callback function as arguments and returns a new array with all the elements of the first array that return true in the callback.\n* `without(array, arrayTwo)`: Takes in two arrays as arguments and returns a new array with all the elements of the first array that are not present in the second array.\n\n","readmeFilename":"README.md"}