0.0.3 • Published 10 years ago

node_rand v0.0.3

Weekly downloads
1
License
-
Repository
-
Last release
10 years ago

Using with Node.js

$ npm install node_rand

require('node_rand');

Test Code

// import
var node_rand = require('node_rand');

console.log( "Test Start" );
console.log( node_rand );

var nTemp = 0;

// 0 ~ 99
console.log( "1 : " + node_rand.rand_two_numbers() );

// 0 ~ 9
console.log( "2 : " + node_rand.rand_two_numbers_max( 10 ) );

// 7 ~ 79
console.log( "3 : " + node_rand.rand_two_numbers_min_max( 7, 80 ) );

// 0 ~ 999
console.log( "4 : " + node_rand.rand_three_numbers() );

// 0 ~ 399
console.log( "5 : " + node_rand.rand_three_numbers_max( 400 ) );

// 150 ~ 499
console.log( "6 : " + node_rand.rand_three_numbers_min_max( 150, 500 ) );

Result (cmd)

1 : 21 2 : 2 3 : 28 4 : 653 5 : 397 6 : 454