{"_id":"@agogte/utilynx","_rev":"18-1f2ca7d4b863c338d23c524bd6992724","name":"@agogte/utilynx","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.7":{"name":"@agogte/utilynx","version":"1.0.7","keywords":["typescript","javascript","utilities","math","string","array","linq","functional"],"author":{"name":"Advait Gogte"},"license":"Commercial","_id":"@agogte/utilynx@1.0.7","maintainers":[{"name":"agogte","email":"agogte17@gmail.com"}],"dist":{"shasum":"179cbb11a055b21574fa2d3dcc6cef21057a8470","tarball":"https://registry.npmjs.org/@agogte/utilynx/-/utilynx-1.0.7.tgz","fileCount":15,"integrity":"sha512-aGw2D44H0KMtO9dtm3UKCB7gxKqA/BFCLgEctJ2a8nUhKf10/rxCcCT+3NOr6aHvDoLTkLgMEBwUJybTkMTRDw==","signatures":[{"sig":"MEYCIQDguC7eH9LGe03yezw3Hev0Ucb9yUrmXk8Hyd96fU6BewIhANElFuBTc1KhwS9El+8ddSpSZMUH4S114KCh9+uGKGpO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23171},"main":"dist-obf/index.js","type":"module","types":"dist/index.d.ts","gitHead":"514c98d39657fd6767ccac0793fa63cd3944ab7c","scripts":{"build":"tsc","clean":"rm -rf dist dist-obf","obfuscate":"javascript-obfuscator dist --output dist-obf --config obfuscator-config.json","build:prod":"npm run clean && npm run build && npm run obfuscate && npm run strip-dist-js","strip-dist-js":"find dist -type f -name '*.js' -delete","prepublishOnly":"npm run build:prod"},"_npmUser":{"name":"agogte","actor":{"name":"agogte","type":"user","email":"agogte17@gmail.com"},"email":"agogte17@gmail.com"},"_npmVersion":"10.8.2","description":"High-level utility functions for working with arrays, math, strings, and more — bringing expressive language features to JavaScript and TypeScript.","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","terser":"^5.43.1","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","javascript-obfuscator":"^4.1.1"},"_npmOperationalInternal":{"tmp":"tmp/utilynx_1.0.7_1751507024296_0.9681006157098206","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@agogte/utilynx","version":"1.0.8","type":"module","description":"High-level utility functions for working with arrays, math, strings, and more — bringing expressive language features to JavaScript and TypeScript.","main":"dist-obf/index.js","types":"dist/index.d.ts","scripts":{"clean":"rm -rf dist dist-obf","build":"tsc","obfuscate":"javascript-obfuscator dist --output dist-obf --config obfuscator-config.json","strip-dist-js":"find dist -type f -name '*.js' -delete","build:prod":"npm run clean && npm run build && npm run obfuscate && npm run strip-dist-js","prepublishOnly":"npm run build:prod"},"keywords":["typescript","javascript","utilities","math","string","array","linq","functional"],"author":{"name":"Advait Gogte"},"license":"Commercial","devDependencies":{"@types/jest":"^30.0.0","javascript-obfuscator":"^4.1.1","terser":"^5.43.1","ts-jest":"^29.4.0","typescript":"^5.8.3","jest":"^29.7.0"},"_id":"@agogte/utilynx@1.0.8","gitHead":"12a752f796cfbee10abbcfe7c340fbbd11fbe3b5","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-2motuDYosG2s1X0c3ftgTI5+SxTZeIDjEXRhIBCc62TcYx7Pqx+QGAHsOTiD5cqfaAFEbNEu+74cDb/Xlyil/Q==","shasum":"7c0d468d19f48bd42508090f7ab2c9bd18693cf4","tarball":"https://registry.npmjs.org/@agogte/utilynx/-/utilynx-1.0.8.tgz","fileCount":15,"unpackedSize":23005,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCrgKwwSQnsHug95DEgyWv8EtYNJhFBmIvhzdg6Tw5NLwIgZMessMnDL9h82KkkhwY7HRFj3Y+qMByyPgNyk+4wWms="}]},"_npmUser":{"name":"agogte","email":"agogte17@gmail.com","actor":{"name":"agogte","email":"agogte17@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"agogte","email":"agogte17@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/utilynx_1.0.8_1751646409274_0.6021793794841992"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-28T17:53:27.407Z","modified":"2025-07-04T16:26:49.635Z","1.0.0":"2025-06-28T17:47:35.101Z","1.0.1":"2025-06-28T17:53:27.719Z","1.0.2":"2025-06-28T21:58:23.204Z","1.0.3":"2025-07-03T00:17:46.607Z","1.0.4":"2025-07-03T00:22:20.477Z","1.0.5":"2025-07-03T01:11:46.715Z","1.0.6":"2025-07-03T01:19:57.982Z","1.0.7":"2025-07-03T01:43:44.491Z","1.0.8":"2025-07-04T16:26:49.453Z"},"author":{"name":"Advait Gogte"},"license":"Commercial","keywords":["typescript","javascript","utilities","math","string","array","linq","functional"],"description":"High-level utility functions for working with arrays, math, strings, and more — bringing expressive language features to JavaScript and TypeScript.","maintainers":[{"name":"agogte","email":"agogte17@gmail.com"}],"readme":"# 🌟 utilynx \n\nHigh-level utility functions for working with arrays, math, strings, and more — bringing expressive language features to JavaScript and TypeScript. \n\nThis project extends the native JavaScript/TypeScript objects (`Array`, `Date`, `Number`, `Object`, and `String`) with powerful utility methods to simplify common programming patterns. Inspired by LINQ (C#) and modern functional programming, these extensions make your code more expressive, readable, and efficient.\n\n---\n\n## 📦 Installation\n\nSimply include the module in your TypeScript project:\n\n```ts\nimport '@agogte/utilynx';\n```\n\nOr if you've bundled it as a package:\n\n```bash\nnpm install @agogte/utilynx\n```\n\n---\n\n## 🔧 Extended Interfaces\n\n### 🧩 `Array<T>` Extensions\n\n| Method | Description |\n|--------|-------------|\n| `firstOrDefault(predicate?)` | Returns the first element that matches the predicate, or `undefined` if none found. |\n| `groupBy(keySelector)` | Groups elements by the result of `keySelector`, returns a dictionary of arrays. |\n| `sum()` | Returns the sum of numeric values in the array. |\n| `average()` | Returns the average of numeric values in the array. |\n\n### 🗓️ `Date` Extensions\n\n| Method | Description |\n|--------|-------------|\n| `addDays(days)` | Returns a new `Date` with the specified number of days added. |\n| `addHours(hours)` | Returns a new `Date` with the specified number of hours added. |\n| `addMinutes(minutes)` | Returns a new `Date` with the specified number of minutes added. |\n| `isWeekend()` | Returns `true` if the date falls on a weekend. |\n| `toShortDateString()` | Returns a string in `YYYY-MM-DD` format. |\n| `diffDays(otherDate)` | Returns the number of full days between two dates. |\n\n### 🔢 `Number` Extensions\n\n| Method | Description |\n|--------|-------------|\n| `isEven()` | Returns `true` if the number is even. |\n| `isOdd()` | Returns `true` if the number is odd. |\n| `sqrt()` | Returns the square root of the number. |\n| `round(precision?)` | Rounds the number to a specified number of decimal places (default: 0). |\n\n### 📦 `Object` Extensions\n\n| Method | Description |\n|--------|-------------|\n| `hasValue()` | Returns `true` if the object is not `null`, `undefined`, or empty. |\n| `isEmpty()` | Returns `true` if the object has no enumerable properties. |\n| `isNumeric()` | Returns `true` if the object represents a numeric value. |\n\n### 🧵 `String` Extensions\n\n| Method | Description |\n|--------|-------------|\n| `isNullOrEmpty()` | Returns `true` if the string is `null`, `undefined`, or empty. |\n| `padLeft(totalLength, padChar)` | Pads the string on the left to the desired total length. |\n| `padRight(totalLength, padChar)` | Pads the string on the right to the desired total length. |\n\n---\n\n## 🚨 Disclaimer\n\nThese extensions modify native prototypes, which can cause conflicts with other libraries or unexpected behavior. Use with caution, preferably in controlled or internal environments.\n\nTo keep things safe and modular, consider wrapping these in utility functions instead of modifying prototypes globally if working on public or shared projects.\n\n---\n\n## 📄 License\n\nThis software is <b>NOT</b> open source.\nYou must obtain explicit written permission from the author to use, copy, modify, or distribute this package.\nCommercial or non-commercial use requires a paid license.\nContact the author for licensing terms and pricing.\n\n---\n\n## 📣 Shoutout\n\nInspired by the elegance of C# LINQ and the power of functional programming. Happy coding! 🚀\n","readmeFilename":"README.md"}