A multi-purpose library that generates random strings, sentences, numbers, software languages and lot's of other things.
This lib is still work in progress.
You can use Fluke JS in Node or in the browser:
Node: Download the pacakge and require the library:
npm install -g fluke var fluke = require('fluke')
Browser: Build and add reference to your html:
<!-- install fluke script in head --> <script src = "fluke.min.js"></script>
You can create a new instance of Fluke:
var myFluke = new Fluke - all instances will inherit methods from the prototype.
// then in your code: myFluke.gender()
Fluke comes pre instantiated when in the browser environment. If you've added a reference to fluke.min in your head an instance of fluke will already be availble to you
// in your code fluke.gender()
NPM Build Scripts / Installation
To install fluke simple use
npm install -g flukejs
- npm install
- npm run build
- npm run tests
- dist folder will contain your references
Note: fluke is not yet published on npm, it will be within the next couple of weeks
Fluke's API is easy to work with and in a basic form at the moment. Fluke has numerous methods that you can use to randomize stuff - categories include:
fluke.floating(10, 1000); // => 722.6953696312755
fluke.bool(); // => true
fluke.integer(233, 500); // => 455
fluke.string(s); // where s is the length of random string
fluke.string(7); ==> "VayYMTm"
@todo: Mocha and Chai
Conributions are welcome, guidelines will be put up soon