1.0.0 • Published 3 years ago

@reactiff/random-walk v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@reactiff/random-walk

Generates random number sequences that are more characteristic of Price Movements i.e. trending.

NPM JavaScript Style Guide

Install

yarn add @reactiff/random-walk

Usage

import RandomWalk from '@reactiff/random-walk'

const rndWalk = new RandomWalk(
    1,      // min:         number
    1000,   // max:         number
    500,    // start:       number
    10,     // maxTrend:    number - max number of steps
    10      // maxStep:     number - max step size 
);

const generatePrice = () => {
    
    console.log( rndWalk.next() );
    
    // run again after delay
    setTimeout(generatePrice, 500);
}

generatePrice();

Publishing the package to npm

# if scoped and free account
npm publish --access public

# otherwise
npm publish

to update

npm version major|minor|patch

and then simply

npm publish

License

MIT © Rick Ellis