Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base62-random

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base62-random

Fast base62 random strings

  • 0.3.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.2K
decreased by-0.81%
Maintainers
1
Weekly downloads
 
Created
Source

base62-random

Generate random [base62 strings] (https://helloacm.com/base62/) with better statistical dispersion than Math.random() unless Math.random is all that's available.

Largely based on uuid-random

Install

yarn add base62-random
npm install base62-random

Example Usage

Node

var base62 = require('base62-random');
base62(12); // 'KsykHbcCzUSL'

Browser

<script src="https://cdn.rawgit.com/deployable/base62-random/v0.3.5/base62-random.min.js"></script>
<script>
  base62(13); // 'BAhl1V1BfUmo3'
</script>

Is base62 string?

base62.test('5HXx8Eznu0'); // true
base62.test('P-f6cA4e'); // false

License

MIT

Keywords

FAQs

Package last updated on 12 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc