npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agogte/utilynx

v1.0.8

Published

High-level utility functions for working with arrays, math, strings, and more — bringing expressive language features to JavaScript and TypeScript.

Downloads

6

Readme

🌟 utilynx

High-level utility functions for working with arrays, math, strings, and more — bringing expressive language features to JavaScript and TypeScript.

This 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.


📦 Installation

Simply include the module in your TypeScript project:

import '@agogte/utilynx';

Or if you've bundled it as a package:

npm install @agogte/utilynx

🔧 Extended Interfaces

🧩 Array<T> Extensions

| Method | Description | |--------|-------------| | firstOrDefault(predicate?) | Returns the first element that matches the predicate, or undefined if none found. | | groupBy(keySelector) | Groups elements by the result of keySelector, returns a dictionary of arrays. | | sum() | Returns the sum of numeric values in the array. | | average() | Returns the average of numeric values in the array. |

🗓️ Date Extensions

| Method | Description | |--------|-------------| | addDays(days) | Returns a new Date with the specified number of days added. | | addHours(hours) | Returns a new Date with the specified number of hours added. | | addMinutes(minutes) | Returns a new Date with the specified number of minutes added. | | isWeekend() | Returns true if the date falls on a weekend. | | toShortDateString() | Returns a string in YYYY-MM-DD format. | | diffDays(otherDate) | Returns the number of full days between two dates. |

🔢 Number Extensions

| Method | Description | |--------|-------------| | isEven() | Returns true if the number is even. | | isOdd() | Returns true if the number is odd. | | sqrt() | Returns the square root of the number. | | round(precision?) | Rounds the number to a specified number of decimal places (default: 0). |

📦 Object Extensions

| Method | Description | |--------|-------------| | hasValue() | Returns true if the object is not null, undefined, or empty. | | isEmpty() | Returns true if the object has no enumerable properties. | | isNumeric() | Returns true if the object represents a numeric value. |

🧵 String Extensions

| Method | Description | |--------|-------------| | isNullOrEmpty() | Returns true if the string is null, undefined, or empty. | | padLeft(totalLength, padChar) | Pads the string on the left to the desired total length. | | padRight(totalLength, padChar) | Pads the string on the right to the desired total length. |


🚨 Disclaimer

These extensions modify native prototypes, which can cause conflicts with other libraries or unexpected behavior. Use with caution, preferably in controlled or internal environments.

To keep things safe and modular, consider wrapping these in utility functions instead of modifying prototypes globally if working on public or shared projects.


📄 License

This software is NOT open source. You must obtain explicit written permission from the author to use, copy, modify, or distribute this package. Commercial or non-commercial use requires a paid license. Contact the author for licensing terms and pricing.


📣 Shoutout

Inspired by the elegance of C# LINQ and the power of functional programming. Happy coding! 🚀