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 🙏

© 2024 – Pkg Stats / Ryan Hefner

js-utils-func

v1.1.5

Published

Javascript utils functions

Downloads

10

Readme

js-utils-func

This package contains a Javascript utilities functions to help developers to start with a standard base to their developments.

Table of Contents


Installation


npm install js-utils-func

Features


In this package you will find the following features:

Encryptation

Encrypto

General features to encrypt/decrypt your data, based on crypto-js package

  • encrypt(data, algorithm, key): encrypt the data with the given algorithm and key. Encoding Base64
  • decrypt(data, algorithm, key): decrypt the data with the given algorithm and key. Encoding Base64
  • encrypt2(data, algorithm, key): encrypt the data with the given algorithm and key. Encoding Hex
  • decrypt2(data, algorithm, key): decrypt the data with the given algorithm and key. Encoding Hex

Crypto

Encryption features that allows you to keep exposed information secure Functions:

  • encrypt(data, key, output): encrypt the data with the given key, the output value indicates if the function encrypt or not
  • decrypt(data, key, output): decrypt the data with the given key, the output value indicates if the function decrypt or not
  • send(data, key, output): encrypt the data with the given key to be sent as api response, the output boolean value indicates if the result is showed or not
  • receive(data, key, output): decrypt the data with the given key to be receive as api request, the output boolean value indicates if the result is showed or not

Logger

Log

General features to log your code in terminal and daily files, based on bunyan package. The output log format is: [yyyy-mm-dd date] LABEL: hostname/pid on server: DATA

  • info(data): log with a INFO label
  • warn(data): log with a WARN label
  • error(data): log with a ERROR label
  • debug(data): log with a DEBUG label
  • fatal(data): log with a FATAL label

Console

The console feature allow you to set a colored output printed in the terminal and when should be printed or not

  • console.log(text, show): The show boolean value indicates if the log is printed in the terminal in color white
  • console.error(text, show): The show boolean value indicates if the error is printed in the terminal in color red
  • console.warn(text, show): The show boolean value indicates if the warn is printed in the terminal in color yellow
  • console.info(text, show): The show boolean value indicates if the info is printed in the terminal in color blue
  • console.table(text, show): The show boolean value indicates if the log is printed in the terminal

Date

DateFormat

Fomat date or date string to the following string formats DDMMYYYY, YYYYMMDD and HHMM

  • format(date, format): Convert to date string in one of the following valid formats: DDMMYYYY, YYYYMMDD or HHMM

Release notes


1.0.X

Initial version with the following features:

  • Crypto
  • Console

1.1.X

New features:

  • Encrypto
  • Log
  • DateFormat