{"_id":"@dbeattie/lotide1","_rev":"1-61badc94c26277c85876905e95346fe1","name":"@dbeattie/lotide1","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dbeattie/lotide1","version":"1.0.0","description":"A lodash knock-off for a few key functions.","main":"assertArraysEqual.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/dbeattie/lotide.git"},"author":{"name":"Darren Beattie","email":"darren@fettle.ca","url":"http://darrenbeattie.com/"},"license":"ISC","bugs":{"url":"https://github.com/dbeattie/lotide/issues"},"homepage":"https://github.com/dbeattie/lotide#readme","devDependencies":{"chai":"^4.2.0","mocha":"^6.2.2"},"gitHead":"f4d29da2b55bb950143b94bb599deee12205620a","_id":"@dbeattie/lotide1@1.0.0","_nodeVersion":"8.9.4","_npmVersion":"6.13.1","dist":{"integrity":"sha512-pCm+kXyiL9XiQUBc1ZJ5mciFu0HBSwBkhL+5kuAMzkZVkF5UqQHyBDFbQKJMedG6GUOcgbsh6jxccb/sxGipmA==","shasum":"6f2e1c11afed10d750b9721e843d9d2ccb1b7772","tarball":"https://registry.npmjs.org/@dbeattie/lotide1/-/lotide1-1.0.0.tgz","fileCount":36,"unpackedSize":25133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5Z8MCRA9TVsSAnZWagAAmS0P/1tXxaM5OV+nXacxXGvq\natBsr9Z7rHDqIFRXPHt3+x/7p0QJxt21ZehGbc8mOAGEwV+71PYerWFGSHJM\niYPWv22L37ybROjh16pQIKw+vECIBIyUycYtEE/a1rwjy89eVX1/dPo9Cyyk\nLoeIC90ZI4kVlh15HEZeVyJ+ZX1O3hlCfJ2c1gdceXl2U69sVJKYUnWwEm37\nj3SsKGT5QJZ/Hg3WU/ZyzGakoD723XenML0OyjjJGRXjphxiyPCxMnP/8SsO\nYZX7w8N003MDWbfxRLou0whg025ZfFCN0cgfex1z8LnFx0Yw8PU/NYionuwH\n7MZI15l4tKlMBRXZiSoR06k1THqJfwZIULyqNDlTPztdE4D/a1qxiC7hrRDw\nRlcNUYXg5UpDDdMbiRjdJB0/735jSVaJAVUzfR0Lc6wQh/s0dpC99SD4TWH3\nruhxXJiNnR1lzO/iSmifj25JBhuZ91qEu5RA0knD9gnJNDcSzmN/Jph3kCQp\noH1RlE3DxhQorYoE66BNQgEKEJVMfhqFK52olKTnL7SPtKV+bATqv7AWygSH\nl1xpOuSFOtI9cLdJIkxyCK0LYPrO7y1nb4guKZUhN6ZFyZd/ldhM+Zbzqoo1\nVIYyG/hGWGveS1xd88PlCZ8YPpcYd1msTBhJp/ALcMzQN9snMGnQaqS9qJrJ\nrxZE\r\n=GTyR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEr+ft5tOe38J7uMqh65KayT11AGfEiC46xjV1RjDqa4AiAPi8WtRkMYGWFXo4xptyuIqYX0d9sf7t8e+FMDLtYg6g=="}]},"maintainers":[{"name":"dbeattie","email":"darren@fettle.ca"}],"_npmUser":{"name":"dbeattie","email":"darren@fettle.ca"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lotide1_1.0.0_1575329547871_0.33175398547440804"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-02T23:32:27.823Z","1.0.0":"2019-12-02T23:32:28.020Z","modified":"2022-04-05T03:17:00.025Z"},"maintainers":[{"name":"dbeattie","email":"darren@fettle.ca"}],"description":"A lodash knock-off for a few key functions.","homepage":"https://github.com/dbeattie/lotide#readme","repository":{"type":"git","url":"git+https://github.com/dbeattie/lotide.git"},"author":{"name":"Darren Beattie","email":"darren@fettle.ca","url":"http://darrenbeattie.com/"},"bugs":{"url":"https://github.com/dbeattie/lotide/issues"},"license":"ISC","readme":"# Lotide\n\nA mini clone of some features from [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 practice at Lighthouse Labs. \n\n## Usage\n\n**Install it:**\n\n`npm install @dbeattie/lotide`\n\n**Require it:**\n\n`const _ = require('@dbeattie/lotide');`\n\n**Call it:**\n\n`const results = _.tail([1, 2, 3]) // => [2, 3]`\n\n## Documentation\n\n* **countLetters(string):** Returns the count of each letter of the string with an object output format.\n\n* **countOnly(allItems, itemsToCount):** Returns the number of times a value (itemsToCount) appears in an array.\n\n* **eqArrays(arr1,arr2):** Compares 2 arrays and return true if they’re equal. Only goes one layer deep, see the recursive option below that goes deeper.\n\n* **eqObject(object1, object2):** Compares tow objects and returns a boolean if the values are the same and the number of keys are the same. Currently only goes one layer deep, see the recursive version below that goes deeper.\n\n* **findKey(obj1, callback):** Returns the first key that matches the value which is given by the callback.\n\n* **findKeyByValue(object, value):** Returns the first key in an object that matches the value. (No callback here).\n\n* **flatten(array):** Takes potentially nested arrays and flattens it into a single array with no nesting. Recursive version goes many layers deep.\n\n* **head(array):** Returns the front element of the array.\n\n* **letterPositions(sentence):** Returns an object that contains the letters (key) and index positions (value) of them from the string sentence input.\n\n* **map(array, callback):** Takes in two arguments 1) array to map and 2) callback function (when predicate is met) and returns the altered array. -- Mimics the prototype.map method.\n\n* **middle(array):** Returns a new array with the middle index element value/s of the original array if it's more than 2 elements. i.e. slices off the front and back elements if longer than 3 or more elements.\n\n* **tail(array):**  Returns a new array without the (head) first index value of the original array. i.e. returns just the tail of the array.\n\n* **takeUntil(array, callback):** Takes all the elements of an array and puts them into a new array until the callback terminates the action. i.e. Take until the condition of the callback is met.  \n\n* **without(source, itemsToRemove):** Returns a new array from a source array minus any items from a a itemsToRemove array.\n\n### Two Recursive STRETCH activites:\n\n* **eqArraysRecursive(arr1, arr2):** Will determine if two arrays many layers deep (deep nested) are equal.\n\n* **eqObjectsRecursive(obj1, obj2):** Will determine if two objects many layers deep (deep nested) are equal.\n\n\n#### The following functions are implemented but not needed with Mocha/Chai installed:\n\n* **assertEqual(x,y):** Logs message to show whether 2 primative types match.\n\n* **assertArraysEqual(arr1, arr2):** Logs a message to show if 2 arrays match.\n\n* **assertObjectsEqual(Obj1, Obj2):** Logs a message to show whether 2 objects match.","readmeFilename":"README.md"}