Socket
Socket
Sign inDemoInstall

chance

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chance - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

2

bower.json
{
"name": "chance",
"version": "0.5.2",
"version": "0.5.3",
"main": "chance.js",

@@ -5,0 +5,0 @@ "ignore": ["node_modules"],

@@ -1,2 +0,2 @@

// Chance.js 0.5.2
// Chance.js 0.5.3
// http://chancejs.com

@@ -792,14 +792,15 @@ // (c) 2013 Victor Quinn

Chance.prototype.date = function (options) {
var year = parseInt(this.year(), 10),
m = this.month({raw: true}),
// Necessary because Date() 0-indexes month but not day or year
// for some reason.
month = m.numeric - 1,
day = this.natural({min: 1, max: m.days}),
date;
var m = this.month({raw: true}),
date_string;
options = initOptions(options, {
year: year,
month: month,
day: day,
year: parseInt(this.year(), 10),
// Necessary to subtract 1 because Date() 0-indexes month but not day or year
// for some reason.
month: m.numeric - 1,
day: this.natural({min: 1, max: m.days}),
hour: this.hour(),
minute: this.minute(),
second: this.second(),
millisecond: this.millisecond(),
american: true,

@@ -809,3 +810,3 @@ string: false

date = new Date(options.year, options.month, options.day);
var date = new Date(options.year, options.month, options.day, options.hour, options.minute, options.second, options.millisecond);

@@ -823,2 +824,6 @@ if (options.american) {

Chance.prototype.hammertime = function (options) {
return this.date(options).getTime();
};
Chance.prototype.hour = function (options) {

@@ -830,3 +835,7 @@ options = initOptions(options);

Chance.prototype.minute = function () {
Chance.prototype.millisecond = function () {
return this.natural({max: 999});
};
Chance.prototype.minute = Chance.prototype.second = function () {
return this.natural({max: 59});

@@ -1086,3 +1095,3 @@ };

Chance.prototype.VERSION = "0.5.2";
Chance.prototype.VERSION = "0.5.3";

@@ -1089,0 +1098,0 @@ // Mersenne Twister from https://gist.github.com/banksean/300494

@@ -5,3 +5,3 @@ {

"description": "Minimalist generator of random strings, numbers, etc.",
"version": "0.5.2",
"version": "0.5.3",
"keywords": ["chance", "random", "generator", "test"],

@@ -8,0 +8,0 @@ "scripts": "chance.js",

{
"name": "chance",
"main": "./chance.js",
"version": "0.5.2",
"version": "0.5.3",
"description": "Chance - Utility library to generate anything random",

@@ -6,0 +6,0 @@ "homepage": "http://chancejs.com",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc