2.0.7 • Published 1 year ago

@dizmo/functions-random v2.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
1 year ago

NPM version Build Status Coverage Status

@dizmo/functions-random

Attaches to the String type a random function which returns a random string for the provided number of bytes and encoding with ascii, base64, hex, latin1 and ucs2 as possible values. By default the number of bytes is 16 and the default encoding is hex.

Usage

Install

npm install @dizmo/functions-random --save

Require

const { random } = require('@dizmo/functions-random');

Examples

random(16);
2fa6651ce3680dd13899156f9550ec61
random(16, 'hex');
d00e24ae8348004bca2f9c07ba6ae43b
random(16, 'ascii');
lZq\x01\x07j\x17:OnlG9u[\x13
random(16, 'base64');
QbqxfgF3JBiCktUQl+p9lQ==
random(16, 'latin1');
ؼ\x8D\x9F*>\nØ\x83BÃÑë{\x15Ð
random(16, 'ucs2');
☔戠䰍⧗灺밄䯗晡

Development

Clean

npm run clean

Build

npm run build

without linting and cleaning:

npm run -- build --no-lint --no-clean

with UMD bundling (incl. minimization):

npm run -- build --prepack

with UMD bundling (excl. minimization):

npm run -- build --prepack --no-minify

Lint

npm run lint

with auto-fixing:

npm run -- lint --fix

Test

npm run test

without linting, cleaning and (re-)building:

npm run -- test --no-lint --no-clean --no-build

Cover

npm run cover

without linting, cleaning and (re-)building:

npm run -- cover --no-lint --no-clean --no-build

Documentation

npm run docs

Publish

npm publish

initially (if public):

npm publish --access=public

Copyright

© 2020 dizmo AG, Switzerland

2.0.7

1 year ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.33

4 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago