{"name":"ul","version":"6.0.0","keywords":["util","nodejs","minimalist"],"author":{"url":"https://ionicabizau.net","name":"Ionică Bizău","email":"bizauionica@gmail.com"},"license":"MIT","_id":"ul@6.0.0","maintainers":[{"name":"ionicabizau","email":"bizauionica@gmail.com"}],"homepage":"https://github.com/IonicaBizau/node-ul","bugs":{"url":"https://github.com/IonicaBizau/node-ul/issues"},"dist":{"shasum":"03e7cbe7c6c6f6d44cb56db205767a2c6068ea9e","tarball":"http://registry-npm.ywwl.com/ul/download/ul-6.0.0.tgz","fileCount":4,"integrity":"sha512-6cQ0cG+oENgRNd5njgP+nQ8Fzyh66675hHvT0NFKF8JdN4L/Q3EPIU9WCKDpbAD2tiC+8QIp87GB5kf/SSJw/A==","signatures":[{"sig":"MEUCIBL7U1P9NTqRlROJQeSwp8YRqwe/zHLZ8YtPLmfim/yCAiEA042nHLnW2sOP0gBTHU2koTkPtdOjflaxntUpFWHtiBc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10697,"size":4333,"noattachment":false,"key":"/ul/-/ul-6.0.0.tgz"},"main":"lib/index.js","type":"module","exports":"./lib/index.js","gitHead":"0fc39d3fe0fd8df60e9b31590bd4142ae2670a4f","scripts":{"test":"node test"},"_npmUser":{"name":"ionicabizau","email":"bizauionica@gmail.com"},"repository":{"url":"git+ssh://git@github.com/IonicaBizau/node-ul.git","type":"git"},"_npmVersion":"11.11.0","description":"A minimalist utility library.","directories":{"test":"test","example":"example"},"_nodeVersion":"25.8.1","dependencies":{"deffy":"^2.2.2","typpy":"^2.3.4"},"_hasShrinkwrap":false,"devDependencies":{"tester":"^1.3.5","is-there":"^4.3.3"},"_npmOperationalInternal":{"tmp":"tmp/ul_6.0.0_1779001397907_0.35181802835117026","host":"s3://npm-registry-packages-npm-production"},"readme":"<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# ul\n\n [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Travis](https://img.shields.io/travis/IonicaBizau/node-ul.svg)](https://travis-ci.org/IonicaBizau/node-ul/) [![Version](https://img.shields.io/npm/v/ul.svg)](https://www.npmjs.com/package/ul) [![Downloads](https://img.shields.io/npm/dt/ul.svg)](https://www.npmjs.com/package/ul) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/@johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)\n\n<a href=\"https://www.buymeacoffee.com/H96WwChMy\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png\" alt=\"Buy Me A Coffee\"></a>\n\n\n\n\n\n\n\n> A minimalist utility library.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :cloud: Installation\n\n```sh\n# Using npm\nnpm install --save ul\n\n# Using yarn\nyarn add ul\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :clipboard: Example\n\n\n\n```js\nimport Ul from \"ul\";\n\n// Input data\nlet obj = {\n    n: null,\n    v: 1\n};\n\nlet def = {\n    n: 1,\n    v: 10,\n    a: 20\n};\n\nlet tmp;\n\n// Merge the two objects and store the result in tmp\nconsole.log(tmp = Ul.deepMerge(obj, def));\n// => { n: null, v: 1, a: 20 }\n\n// Clone the tmp object -- the clone will have a\n// different reference\nconsole.log(tmp === Ul.clone(tmp));\n// => false\n\n// Show the absolute path to the home directory\nconsole.log(Ul.home()); // or `console.log(Ul.HOME_DIR)`\n// => /home/ionicabizau\n\n// One level merge\nconsole.log(Ul.merge({\n    foo: {\n        bar: 42\n    }\n}, {\n    foo: {\n        bar: 1,\n        baz: 7\n    }\n}));\n// => { { bar: 42 } }\n```\n\n\n\n\n\n\n\n\n\n\n\n## :memo: Documentation\n\n\n### `merge(dst, src)`\nOne-level merge. Faster than `deepMerge`.\n\n#### Params\n\n- **object** `dst`: The destination object.\n- **object** `src`: The source object (usually defaults).\n\n#### Return\n- **object** The result object.\n\n### `deepMerge()`\nRecursively merges the objects from the arguments, returning a new object.\n\nUsage: `Ul.deepMerge(obj1, obj2, obj3, obj4, ..., objN)`\n\n#### Return\n- **object** The merged objects.\n\n### `clone(item)`\nCreates a deep clone of the provided item.\n\n#### Params\n\n- **object|Array** `item`: The item that should be cloned\n\n#### Return\n- **object|Array** The cloned object\n\n### `home()`\nGets the home directory path on any platform. The value can also be\naccessed using `Ul.HOME_DIR`.\n\n#### Return\n- **string** The home directory path.\n\n\n\n\n\n\n\n\n\n## :question: Get Help\n\nThere are few ways to get help:\n\n\n\n 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.\n 2. For bug reports and feature requests, open issues. :bug:\n 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :yum: How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n\n## :sparkling_heart: Support my projects\nI open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,\nthis takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).\n\nHowever, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:\n\n\n - Starring and sharing the projects you like :rocket:\n - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:\n - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:\n - [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).\n - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`\n\n    ![](https://i.imgur.com/z6OQI95.png)\n\n\nThanks! :heart:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :scroll: License\n\n[MIT][license] © [Ionică Bizău][website]\n\n\n\n\n\n\n[license]: /LICENSE\n[website]: https://ionicabizau.net\n[contributing]: /CONTRIBUTING.md\n[docs]: /DOCUMENTATION.md\n[badge_patreon]: https://ionicabizau.github.io/badges/patreon.svg\n[badge_amazon]: https://ionicabizau.github.io/badges/amazon.svg\n[badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg\n[badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg\n[patreon]: https://www.patreon.com/ionicabizau\n[amazon]: http://amzn.eu/hRo9sIZ\n[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW\n","publish_time":1779001398098,"_cnpm_publish_time":1779001398098,"dist-tags":{"latest":"7.0.0"}}