{"_id":"@abhishek2005/awesome-utils","name":"@abhishek2005/awesome-utils","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@abhishek2005/awesome-utils","version":"1.0.0","description":"A useful npm package with utility functions","license":"MIT","author":{"name":"Abhishek Singla","email":"abhishek1677.be23@chitkara.edu.in"},"type":"commonjs","main":"index.js","types":"index.d.ts","keywords":["utility","helper","javascript","nodejs"],"scripts":{"test":"jest","start":"node index.js","example":"node example.js","build":"echo 'No build step required'","prepublishOnly":"npm test"},"engines":{"node":">=14.0.0"},"devDependencies":{"jest":"^29.0.0"},"_id":"@abhishek2005/awesome-utils@1.0.0","_nodeVersion":"20.17.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-baaWcirgRiVYVWSTKjJcZaSwQsbAKmPyBPE6WogsuOxAj3NQANL3jAaoBqcdN5y2lCsPIfOJjzmf1gGd75LQUA==","shasum":"adc2b4a2e3d5bdb1287ad3b94ef616bb80201621","tarball":"https://registry.npmjs.org/@abhishek2005/awesome-utils/-/awesome-utils-1.0.0.tgz","fileCount":6,"unpackedSize":9693,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE3AohC2ETG1Gjtj/2C9wGK7AfDVnIGLTs7cxklxyq6hAiEAwm5Wsh6UiaJOjBTXfFZk7mAV4etZ/INfvABOfAjhFUA="}]},"_npmUser":{"name":"abhishek2005","email":"abhishek1677.be23@chitkara.edu.in"},"directories":{},"maintainers":[{"name":"abhishek2005","email":"abhishek1677.be23@chitkara.edu.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/awesome-utils_1.0.0_1752477364482_0.6391563795697166"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-14T07:16:04.346Z","1.0.0":"2025-07-14T07:16:04.661Z","modified":"2025-07-14T07:16:04.922Z"},"maintainers":[{"name":"abhishek2005","email":"abhishek1677.be23@chitkara.edu.in"}],"description":"A useful npm package with utility functions","keywords":["utility","helper","javascript","nodejs"],"author":{"name":"Abhishek Singla","email":"abhishek1677.be23@chitkara.edu.in"},"license":"MIT","readme":"# Awesome Utils\r\n\r\nA collection of useful utility functions for JavaScript/Node.js projects.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @yourusername/awesome-utils\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nconst { capitalize, isEmpty, debounce, deepClone, randomString } = require('@yourusername/awesome-utils');\r\n\r\n// Capitalize a string\r\nconsole.log(capitalize('hello world')); // \"Hello world\"\r\n\r\n// Check if a value is empty\r\nconsole.log(isEmpty('')); // true\r\nconsole.log(isEmpty([])); // true\r\nconsole.log(isEmpty({})); // true\r\nconsole.log(isEmpty('hello')); // false\r\n\r\n// Debounce a function\r\nconst debouncedFunction = debounce(() => {\r\n  console.log('This will run after 300ms of no calls');\r\n}, 300);\r\n\r\n// Deep clone an object\r\nconst original = { a: 1, b: { c: 2 } };\r\nconst cloned = deepClone(original);\r\n\r\n// Generate a random string\r\nconsole.log(randomString()); // e.g., \"aB3kL9mN\"\r\nconsole.log(randomString(12, 'ABCDEF123456')); // e.g., \"A3B6C1D4E2F5\"\r\n```\r\n\r\n## API Reference\r\n\r\n### `capitalize(str)`\r\n\r\nCapitalizes the first letter of a string.\r\n\r\n- **str** (string): The string to capitalize\r\n- **Returns**: (string) The capitalized string\r\n\r\n### `isEmpty(value)`\r\n\r\nChecks if a value is empty (null, undefined, empty string, empty array, or empty object).\r\n\r\n- **value** (any): The value to check\r\n- **Returns**: (boolean) True if the value is empty, false otherwise\r\n\r\n### `debounce(func, delay)`\r\n\r\nDebounces a function call.\r\n\r\n- **func** (Function): The function to debounce\r\n- **delay** (number): The delay in milliseconds\r\n- **Returns**: (Function) The debounced function\r\n\r\n### `deepClone(obj)`\r\n\r\nDeep clones an object.\r\n\r\n- **obj** (any): The object to clone\r\n- **Returns**: (any) The cloned object\r\n\r\n### `randomString(length, charset)`\r\n\r\nGenerates a random string of specified length.\r\n\r\n- **length** (number, optional): The length of the random string (default: 8)\r\n- **charset** (string, optional): The character set to use (default: alphanumeric)\r\n- **Returns**: (string) The generated random string\r\n\r\n## Testing\r\n\r\n```bash\r\nnpm test\r\n```\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Changelog\r\n\r\n### v1.0.0\r\n- Initial release\r\n- Added capitalize, isEmpty, debounce, deepClone, and randomString utilities\r\n","readmeFilename":"README.md","_rev":"1-f640052382331abb79132b5de3a2a802"}