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

password-generator-lite

v1.0.4

Published

**password-generator-lite** is a lightweight JavaScript library for cryptographic hashing, extraction, and transformation of strings. It provides functions for concatenating strings, computing SHA256 hashes, extracting numbers and letters, combining alpha

Downloads

2

Readme

password-generator-lite

password-generator-lite is a lightweight JavaScript library for cryptographic hashing, extraction, and transformation of strings. It provides functions for concatenating strings, computing SHA256 hashes, extracting numbers and letters, combining alphanumeric passwords, calculating string hashes, and transforming strings by converting lowercase letters to uppercase, and replacing the first alphanumeric character with a random sign.

Installation

You can install password-generator-lite via npm:

npm install password-generator-lite

Usage

concatenateAndHash

  •   import { concatenateAndHash } from 'password-generator-lite';
      let textA = "text1"
      let textB = "text2"
      let textArr = [textA, textB]
      let output1 = concatenateAndHash(textA)
      let output2 = concatenateAndHash(textArr)

extractNumbers

  •   import { extractNumbers } from 'password-generator-lite';
    
      let numberOfCharacters = 8 //defult
      let textA = "text1"
      let textB = "text2"
      let textArr = [textA, textB]
    
      let output1 = extractNumbers(textA)
      let output2 = extractNumbers(textArr)
      let output1 = extractNumbers(textA, numberOfCharacters)
      let output2 = extractNumbers(textArr, numberOfCharacters)

extractLetters

  •   import { extractLetters } from 'password-generator-lite';
    
      let numberOfCharacters = 8 //defult
      let textA = "text1"
      let textB = "text2"
      let textArr = [textA, textB]
    
      let output1 = extractLetters(textA)
      let output2 = extractLetters(textArr)
      let output1 = extractLetters(textA, numberOfCharacters)
      let output2 = extractLetters(textArr, numberOfCharacters)

combineNumbersAndLetters

  •   import { combineNumbersAndLetters } from 'password-generator-lite';
    
      let numberOfCharacters = 8 //defult
      let textA = "text1"
      let textB = "text2"
      let textArr = [textA, textB]
    
      let output1 = combineNumbersAndLetters(textA)
      let output2 = combineNumbersAndLetters(textArr)
      let output1 = combineNumbersAndLetters(textA, numberOfCharacters)
      let output2 = combineNumbersAndLetters(textArr, numberOfCharacters)

transformToUpperCase

  •   import { transformToUpperCase } from 'password-generator-lite';
    
      let numberOfCharacters = 8 //defult
      let textA = "text1"
      let textB = "text2"
      let textArr = [textA, textB]
    
      let output1 = transformToUpperCase(textA)
      let output2 = transformToUpperCase(textArr)
      let output1 = transformToUpperCase(textA, numberOfCharacters)
      let output2 = transformToUpperCase(textArr, numberOfCharacters)

transformToSign

  •   import { transformToSign } from 'password-generator-lite';
    
      let numberOfCharacters = 8 //defult
      let textA = "text1"
      let textB = "text2"
      let textArr = [textA, textB]
    
      let output1 = transformToSign(textA)
      let output2 = transformToSign(textArr)
      let output1 = transformToSign(textA, numberOfCharacters)
      let output2 = transformToSign(textArr, numberOfCharacters)

api

concatenateAndHash(textArray)

Concatenates an array of strings and computes the SHA256 hash of the resulting string.

extractNumbers(hash, numberOfCharacters)

Extracts numeric characters from a hash and returns a specified number of characters.

extractLetters(hash, numberOfCharacters)

Extracts alphabetical characters from a hash and returns a specified number of characters.

combineNumbersAndLetters(hash, numberOfCharacters)

Combines numeric and alphabetical passwords extracted from a hash.

transformToUpperCase(hash, numberOfCharacters)

Transforms lowercase letters to uppercase randomly in a string.

transformToSign(hash, numberOfCharacters)

Transforms the first alphanumeric character in a string to a random sign.

License

This project is licensed under the ISC

Contributing

Contributions are welcome! Please see our Contributing Guidelines for more information.

Issues

If you discover any issues, please create an issue in our GitHub repository.

Credits

password-generator-lite is developed and maintained by Vir Garg.

Support

For any inquiries or support requests, please contact us at [email protected].