Skip to main content

Generates an object of default WordPress salts (or any other string). No internet required.

This package works with Bun, Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers
JSR Score
100%
Published
4 weeks ago (5.0.0)

wp-salts

Generates an object of default WordPress salts (or any other string). No internet required.

License Version: npm Version: jsr CI: Node CI: Deno

Installation

npm install wp-salts -S

Usage

wpSalts(keys: string | string[], length?: number)

Example:

import { wpSalts } from 'wp-salts';

// Standard WordPress salts
wpSalts();

// Custom salts
wpSalts('SECURE_AUTH_KEY');
wpSalts(['AUTH_KEY', 'AUTH_SALT'], 128);

Note: The minimum length of each salt is 8-bit (64 characters)

Credits

License

This work is licensed under The MIT License.

Add Package

deno add @idleberg/wordpress-salts

Import symbol

import * as mod from "@idleberg/wordpress-salts";

Add Package

npx jsr add @idleberg/wordpress-salts

Import symbol

import * as mod from "@idleberg/wordpress-salts";

Add Package

yarn dlx jsr add @idleberg/wordpress-salts

Import symbol

import * as mod from "@idleberg/wordpress-salts";

Add Package

pnpm dlx jsr add @idleberg/wordpress-salts

Import symbol

import * as mod from "@idleberg/wordpress-salts";

Add Package

bunx jsr add @idleberg/wordpress-salts

Import symbol

import * as mod from "@idleberg/wordpress-salts";