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

supasteeltokens

v0.1.3

Published

SupaSteelTokens or SSTs, are "taped" cookies that use the native 'crypto' module to encrypt/decrypt data. With SSTs, you can: selected the number of keys you want to generate for "taping" your cookies, select any given ones at random, and tape and untap y

Downloads

1

Readme

⚡️SupaSteelTokens - SSTs

SupaSteelTokens or SSTs, are "taped" cookies that use the native 'crypto' module to encrypt/decrypt data. With SSTs, you can: selected the number of keys you want to generate for "taping" your cookies, select any given ones at random, and tape and untap your cookies.

Tabla de Contenido

Installation

NPM:
npm i supasteeltokens

YARN:
yarn add supasteeltokens

Hook: useSSTKeyGen

This hook allows you to generate a selected number of keys. For security, you'd store the generated keys in environment variables (.env*), that you can access securely. Because you cannot use arrays as values, I've made it so that the array with your keys are returned as a string that you can paste the value to in your env variable.

SSTKeyGen API

  • rotations (number, required): This prop lets you tell the generator how many keys it should generate for you to rotate from.

// index.js
import { useSSTKeyGen } from 'supasteeltokens'

/// You only need to use this when generating keys
// apart from that, you can take this out 
let keys = useSSTKeyGen(3)

console.log(keys)
/*
PS: Shown like this for readability, but it's just one long string
separated by commas.

1. KxPKjwJgHbTHvKPmn1bObT0Ouh9W9tazhijtB8/KZaiRG1LKxRL8Bzxg+14QjfnzeZlZQGkcCDAcIKZqNuXwy1cwtcE6bvpwK/KDzKsQg383/NdXRHJnx1AOzwCwbllsHaffVsfvnCFi5/zJVpCYma6XAveSRr2rtiKscwKItCc=

2. 6DIQI5Uf/doPG+9skKUsgsi4oM8oKZ5qPFrPgU5b84UTWJDBMrWdCeXsNG3n/a1SM/u8caGt6QaoJ+P+gbUdKjQRzwr/bbGbfW+X5MoR7Ot5Q4EckV1XU9D1EUBnMts4/WVbn2ClJON1P/vIZbCsZsUdnKfW/d4Mfv6ANOYIVRo=

3. rU/z60t9n8q9DEB673qQn0Swes2OyYc1MzHglnx2/uzYEUAxeynqp8rxZDwBibhJvZ03Hu67ZPDKK0c1cTS3NglRTkne7U85p0X+xRE7eCWOvr1olHgsbmujXFZrA8vuzq+VLNdEHPTKPMIRPoPCK+HjA24RmicJV5YXUai94k8=
*/

Hook: useSSTSelect

This hook allows you to take in the delimited string in the environment variable storing your SST keys, converts them back into an array, select one from the available options and returns it. This comes in clutch when using the useSSTEncrypt hook.

SSTSelect API

  • keys (string, required): takes in the string from useSSTKeyGen.
import { useSSTKeyGen, useSSTSelect } from 'supasteeltokens'

/// You only need to use this when generating keys
// apart from that, you can take this out 
let keys = useSSTKeyGen(3)

let result = useSSTSelect(keys)

console.log(result)
/*
In this example the second option (_arr[1]) was returned ->
6DIQI5Uf/doPG+9skKUsgsi4oM8oKZ5qPFrPgU5b84UTWJDBMrWdCeXsNG3n/a1SM/u8caGt6QaoJ+P+gbUdKjQRzwr/bbGbfW+X5MoR7Ot5Q4EckV1XU9D1EUBnMts4/WVbn2ClJON1P/vIZbCsZsUdnKfW/d4Mfv6ANOYIVRo=
*/

Hook: useSSTEncrypt

SSTEncrypt API

Hook: useSSTDecrypt

SSTDecrypt API

Hook: useSSTDestroy

SSTDestroy API