map-seed-generator

1.0.0 • Public • Published

Map-seed-for-games

Generate fixed-length number seed from any length string
A system for encoding an any length message into a fixed length message.
The message length is set by the variable seed_length, default 24.

Installation

npm i map-seed-generator

Usage

const { getSeed } = require('map-seed-generator');

const seed = getSeed('Hello world');
console.log(seed); // returns 101936881026769457016000

// by default getSeed() returns 24 digit, but we can override it by second argument

const shortSeed = getSeed('Hello world', 16);
console.log(shortSeed); // returns 1019368810267694

const longSeed = getSeed('Hello world', 32);
console.log(longSeed); // returns 10193688102676941385171123803620

Package Sidebar

Install

npm i map-seed-generator

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

9.25 kB

Total Files

8

Last publish

Collaborators

  • nikitakashin