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

utilities-armnode

v0.0.4

Published

![](https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQoRNotK8e1GIfluPHlmGvvQe3INexzi3k5YA&usqp=CAU)

Readme

utilities-armnode

utilities-armnode is a Node.js package for help to code.

Installation

Use the package manager npm to install utilities-armnode.

npm install utilities-armnode

Usage

const { TransformatorData } = require('utilities-armnode');

let transformator = new TransformatorData();

let encryptedString = transformator.encrypt('string');
console.log(encryptedString) // 6741a576d4607031131e809108d5a1c1

let decryptedString = transformator.decrypt(encryptedString);
console.log(decryptedString) // 'string'

Helpers

TransformatorData

const fs = require('fs');
const { TransformatorData } = require('utilities-armnode');

let transformator = new TransformatorData(algorithm, password, encoding); 
// Or just new TransformatorData();
// algorithm - optional param, default value is 'aes192', also available values | 'aes-128-ccm'
// password - optional param, default value is 'password-text', you can use any string
// encoding - optional param, default value is 'hex', you can use any string

// Encryption and decryption examples for different data types

// String
let encryptedString = transformator.encrypt('string');
let decryptedString = transformator.decrypt(encryptedString);

// Buffer
let encryptedBuffer = transformator.encrypt(new Buffer("hello world", "utf8"));
let decryptedBuffer = transformator.decrypt(encryptedBuffer).toString('utf8');

// Stream data
let readStreamData = fs.createReadStream('./test.txt');
let encryptedStream = transformator.encrypt(readStreamData);
let writeStreamData = fs.createWriteStream('./file.out.txt');
let decryptedStream = transformator.decrypt(encryptedStream).pipe(writeStreamData);

// JSON or sample Object
let encryptedJSON = transformator.encrypt({ "key": "value" });
let decryptedJSON = transformator.decrypt(encryptedJSON);

hash

const { hash } = require('utilities-armnode');
let data = 'sample string';
let salt = 'salt-striing';
let iteration = 2;

let dataHash = hash.create(data, salt, iteration);
// Or just hash.create();
// data - required param, data from which will be generate hash
// salt - optional param, default value is '', you can use any string
// iteration - optional param, default value is 5, you can use any number

let randomHash = hash.random();

errors

const { errors } = require('utilities-armnode');
let message = 'error-message';

throw new errors.AssertionError(message); // status code is 500
// message - optional param, default value is 'Bad request', you can use any string

throw new errors.NotFoundError(message); // status code is 404
// message - optional param, default value is 'Not found', you can use any string

throw new errors.AccessError(message); // status code is 403
// message - optional param, default value is 'Forbidden', you can use any string

// Error handling in Node.js express app
const express = require("express");
const app = express();

app.use(errors.errorHandler);
// OR
errors.errorHandler(err, req, res, next);
// err - required param, Error object
// req - required param, express request object
// res - required param, express response object
// next - required param, express next function

formatPhoneNumber

const { formatPhoneNumber } = require('utilities-armnode');
let phone = '091**15**'; // change to real phone number
let country = 'am';

let formattedPhoneNumber = formatPhoneNumber(phone, country);
// phone - required param, real phone number type of String
// country - required param, real country code type oy String

// formattedPhoneNumber = +374 91 ** 15 ** - if it is valid phone number
// formattedPhoneNumber = false - if it is invalid phone number

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT