Comparing version 0.7.5 to 0.7.6
{ | ||
"name": "chance", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"main": "chance.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
@@ -5,3 +5,3 @@ { | ||
"description": "Minimalist generator of random strings, numbers, etc.", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"keywords": ["chance", "random", "generator", "test"], | ||
@@ -8,0 +8,0 @@ "main": "chance.js", |
{ | ||
"name": "chance", | ||
"main": "./chance.js", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"description": "Chance - Utility library to generate anything random", | ||
@@ -6,0 +6,0 @@ "homepage": "http://chancejs.com", |
112
README.md
@@ -131,2 +131,9 @@ # Chance | ||
## Dependent tools | ||
### Fake JSON Schema | ||
Use chance generators to populate JSON Schema samples. | ||
See: https://github.com/pateketrueke/json-schema-faker/ | ||
## Author | ||
@@ -144,56 +151,57 @@ ### Victor Quinn | ||
project : chancejs | ||
repo age : 1 year, 11 months | ||
active : 140 days | ||
commits : 500 | ||
repo age : 2 years | ||
active : 143 days | ||
commits : 508 | ||
files : 23 | ||
authors : | ||
343 Victor Quinn 68.6% | ||
26 Oliver Salzburg 5.2% | ||
13 Tim Petricola 2.6% | ||
12 Alex DiLiberto 2.4% | ||
11 davmillar 2.2% | ||
7 Jan Tojnar 1.4% | ||
5 Michael Cordingley 1.0% | ||
5 Matt Klaber 1.0% | ||
4 Abhijeet Pawar 0.8% | ||
4 Avishaan 0.8% | ||
4 Chris Villarreal 0.8% | ||
4 Kevin Garnett 0.8% | ||
3 Alexandr Lozovyuk 0.6% | ||
3 Nicholas Johnson 0.6% | ||
3 Nate Clark 0.6% | ||
3 qjcg 0.6% | ||
3 Dominic Barnes 0.6% | ||
3 leesei 0.6% | ||
2 SeeSchloss 0.4% | ||
2 Iskren Chernev 0.4% | ||
2 xshyamx 0.4% | ||
2 Nathan MacInnes 0.4% | ||
2 Andreas Koeberle 0.4% | ||
2 Pascal Borreli 0.4% | ||
2 Patrick Mowrer 0.4% | ||
2 Stefan Penner 0.4% | ||
2 Adam Krebs 0.4% | ||
2 dhilipsiva 0.4% | ||
2 path411 0.4% | ||
2 shyam 0.4% | ||
2 somejeff 0.4% | ||
1 Doug Lawrence 0.2% | ||
1 Brian.Barnett 0.2% | ||
1 Adam Pointer 0.2% | ||
1 afc163 0.2% | ||
1 Danny Yates 0.2% | ||
1 ddunning 0.2% | ||
1 Johannes Stein 0.2% | ||
1 flrent 0.2% | ||
1 kiran 0.2% | ||
1 Ng Patrick 0.2% | ||
1 Billy Moon 0.2% | ||
1 kkroner 0.2% | ||
1 Matt Altermatt 0.2% | ||
1 lkptrzk 0.2% | ||
1 Richard Anaya 0.2% | ||
1 Ryan Tenney 0.2% | ||
1 Samuel Greene 0.2% | ||
1 mamrehn 0.2% | ||
346 Victor Quinn 68.1% | ||
26 Oliver Salzburg 5.1% | ||
13 Tim Petricola 2.6% | ||
12 Alex DiLiberto 2.4% | ||
11 davmillar 2.2% | ||
7 Jan Tojnar 1.4% | ||
6 Patrick Mowrer 1.2% | ||
5 Michael Cordingley 1.0% | ||
5 Matt Klaber 1.0% | ||
4 Abhijeet Pawar 0.8% | ||
4 Kevin Garnett 0.8% | ||
4 Avishaan 0.8% | ||
4 Chris Villarreal 0.8% | ||
3 Alexandr Lozovyuk 0.6% | ||
3 Nate Clark 0.6% | ||
3 leesei 0.6% | ||
3 Dominic Barnes 0.6% | ||
3 qjcg 0.6% | ||
3 Nicholas Johnson 0.6% | ||
2 Stefan Penner 0.4% | ||
2 Adam Krebs 0.4% | ||
2 Andreas Koeberle 0.4% | ||
2 Iskren Chernev 0.4% | ||
2 Nathan MacInnes 0.4% | ||
2 Pascal Borreli 0.4% | ||
2 SeeSchloss 0.4% | ||
2 dhilipsiva 0.4% | ||
2 path411 0.4% | ||
2 shyam 0.4% | ||
2 somejeff 0.4% | ||
2 xshyamx 0.4% | ||
1 mamrehn 0.2% | ||
1 Doug Lawrence 0.2% | ||
1 Tomasz Ducin 0.2% | ||
1 Danny Yates 0.2% | ||
1 afc163 0.2% | ||
1 Brian.Barnett 0.2% | ||
1 ddunning 0.2% | ||
1 Adam Pointer 0.2% | ||
1 flrent 0.2% | ||
1 kiran 0.2% | ||
1 kkroner 0.2% | ||
1 Billy Moon 0.2% | ||
1 Ng Patrick 0.2% | ||
1 lkptrzk 0.2% | ||
1 Matt Altermatt 0.2% | ||
1 Richard Anaya 0.2% | ||
1 Ryan Tenney 0.2% | ||
1 Samuel Greene 0.2% | ||
1 Johannes Stein 0.2% | ||
``` | ||
@@ -200,0 +208,0 @@ |
@@ -170,2 +170,21 @@ /// <reference path="../chance.js" /> | ||
it("exp() returns a valid credit card expiration date (ie a future date)", function () { | ||
_(1000).times(function () { | ||
exp = chance.exp({raw: true}); | ||
var now = new Date(); | ||
var nowMonth = now.getMonth() + 1; | ||
var nowYear = now.getFullYear(); | ||
var expMonth = parseInt(exp.month, 10); | ||
var expYear = parseInt(exp.year, 10); | ||
expect(expYear).to.be.at.least(nowYear); | ||
if(expYear === nowYear) { | ||
expect(expMonth).to.be.above(nowMonth); | ||
} | ||
}); | ||
}); | ||
it("exp_month() returns a numeric month with leading 0", function () { | ||
@@ -185,3 +204,12 @@ _(1000).times(function () { | ||
}); | ||
it("exp_month() will return a future month if passed {future: true}", function () { | ||
_(1000).times(function () { | ||
var nowMonth = new Date().getMonth() + 1; | ||
var expMonth = parseInt(chance.exp_month({ future: true }), 10); | ||
expect(expMonth).to.be.above(nowMonth); | ||
}); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
236978
4856
222