Skip to content

mgthomas99/offset-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

offset-number

Apply an offset to a JavaScript numeric value.

Usage

Installation

    npm install offset-number --save # Installs via NPM
    yarn add offset-number # Installs via Yarn

API

    var offset = require("offset-number");

    offset(42, 2) // -> A random number in the range [40,44).
    offset(5, 10) // -> A random number in the range [-5,15).

Build

    npm run build # Runs an NPM script which builds the project
    gulp build # Directly execute the gulp build script

Both the above commands perform the same operation internally; the NPM build script calls the Gulp build script.

Test

    npm run test # Runs an NPM script which tests the project

Due to the project being written in TypeScript and the tests written in Javascript, the project must be built before it can be tested.

License

See the LICENSE file for license information.

About

Apply an offset to a number

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published