New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

rgx-utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

rgx-utils

A modern collection of reusable utility functions for JavaScript and TypeScript, designed to simplify everyday development tasks.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

rgx-utils

A collection of utility functions for common JavaScript/TypeScript.A modern collection of reusable utility functions for JavaScript and TypeScript, designed to simplify everyday development tasks.

Installation

npm install rgx-utils

Available Utilities

pipeline
import { pipeline } from 'rgx-utils';

const [op1, op2] = pipeline({
   input: [5, 2, 8, 3, 1, 4],
   filter: (num) => num % 2 === 0,
   map: {
      matched: (num) => num * num,
      unmatched: (num) => -num,
   },
   sort: {
      matched: (a, b) => a - b,
      unmatched: (a, b) => a - b,
   },
});

console.log("op1:", op1);   // [4, 16, 64]
console.log("op2:", op2); // [-5, -3, -1]

generatePassword
import { generatePassword } from 'rgx-utils';

generatePassword(12); // Generates a 12-character password
getBase64
import { getBase64 } from 'rgx-utils';

// For files:
const fileBase64 = await getBase64(file);

slug
import { slug } from 'rgx-utils';

const urlSlug = slug('Some String to Slugify'); // "some-string-to-slugify"

truncate
import { truncate } from 'rgx-utils';

const shortText = truncate('Very long text here', 10); // "Very long..."
const customEllipsis = truncate('Very long text here', 10, ' >>'); // "Very long >>"

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to contribute to this project.

License

This package is open-source and available under the MIT License.

Keywords

javasript

FAQs

Package last updated on 13 Jul 2025

Related posts