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.6.3 to 0.6.4

test/test.mobile.js

2

bower.json
{
"name": "chance",
"version": "0.6.3",
"version": "0.6.4",
"main": "chance.js",

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

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

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

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

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

@@ -44,3 +44,9 @@ "homepage": "http://chancejs.com",

"dice"
]
],
"spm": {
"main": "chance.js",
"ignore": [
"test"
]
}
}

@@ -53,2 +53,10 @@ # Chance

### spm [![](http://spmjs.io/badge/chance)](http://spmjs.io/package/chance)
It can also be used with [spm](http://spmjs.io/package/chance).
```
spm install chance
```
### Component

@@ -110,39 +118,46 @@

project : chancejs
repo age : 1 year, 2 months
active : 89 days
commits : 346
files : 21
repo age : 1 year, 5 months
active : 103 days
commits : 387
files : 22
authors :
257 Victor Quinn 74.3%
13 Tim Petricola 3.8%
11 davmillar 3.2%
5 Alex DiLiberto 1.4%
5 Matt Klaber 1.4%
5 Michael Cordingley 1.4%
4 Kevin Garnett 1.2%
4 Avishaan 1.2%
4 Abhijeet Pawar 1.2%
3 qjcg 0.9%
3 Alexandr Lozovyuk 0.9%
3 Nicholas Johnson 0.9%
2 xshyamx 0.6%
2 Adam Krebs 0.6%
2 Andreas Koeberle 0.6%
2 Chris Villarreal 0.6%
2 Iskren Chernev 0.6%
2 Pascal Borreli 0.6%
2 dhilipsiva 0.6%
2 path411 0.6%
2 shyam 0.6%
1 Richard Anaya 0.3%
1 Johannes Stein 0.3%
1 ddunning 0.3%
1 Doug Lawrence 0.3%
1 flrent 0.3%
1 leesei 0.3%
1 lkptrzk 0.3%
1 Dominic Barnes 0.3%
1 Ryan Tenney 0.3%
1 Samuel Greene 0.3%
1 Ng, Patrick 0.3%
274 Victor Quinn 70.8%
13 Oliver Salzburg 3.4%
13 Tim Petricola 3.4%
11 davmillar 2.8%
5 Michael Cordingley 1.3%
5 Alex DiLiberto 1.3%
5 Matt Klaber 1.3%
4 Avishaan 1.0%
4 Kevin Garnett 1.0%
4 Abhijeet Pawar 1.0%
4 Chris Villarreal 1.0%
3 Alexandr Lozovyuk 0.8%
3 qjcg 0.8%
3 Nicholas Johnson 0.8%
2 xshyamx 0.5%
2 Adam Krebs 0.5%
2 Andreas Koeberle 0.5%
2 Iskren Chernev 0.5%
2 Nathan MacInnes 0.5%
2 Pascal Borreli 0.5%
2 SeeSchloss 0.5%
2 Stefan Penner 0.5%
2 dhilipsiva 0.5%
2 path411 0.5%
2 shyam 0.5%
1 Brian.Barnett 0.3%
1 Johannes Stein 0.3%
1 afc163 0.3%
1 Doug Lawrence 0.3%
1 ddunning 0.3%
1 Dominic Barnes 0.3%
1 flrent 0.3%
1 kkroner 0.3%
1 leesei 0.3%
1 Richard Anaya 0.3%
1 Ryan Tenney 0.3%
1 Samuel Greene 0.3%
1 lkptrzk 0.3%
1 Ng Patrick 0.3%
```

@@ -149,0 +164,0 @@

@@ -31,3 +31,3 @@ require.config({

var assert = chai.assert;
require(['test.address', 'test.basic', 'test.finance', 'test.helpers', 'test.misc', 'test.person', 'test.text', 'test.time', 'test.web'], function () {
require(['test.address', 'test.basic', 'test.finance', 'test.helpers', 'test.misc', 'test.person', 'test.text', 'test.time', 'test.web', 'test.mobile'], function () {
mocha.reporter('html');

@@ -34,0 +34,0 @@

@@ -314,2 +314,31 @@ define(['Chance', 'mocha', 'chai', 'underscore'], function (Chance, mocha, chai, _) {

});
it("returns repeatable results if a string is provided as a seed", function () {
seed = "foo";
chance1 = new Chance(seed);
chance2 = new Chance(seed);
_(1000).times(function () {
expect(chance1.random()).to.equal(chance2.random());
});
});
it("returns different results if two different strings are provided", function () {
chance1 = new Chance("foo");
chance2 = new Chance("baz");
_(1000).times(function () {
expect(chance1.random()).to.not.equal(chance2.random());
});
});
it("returns different results if multiple arguments are provided", function () {
seed = new Date().getTime();
chance1 = new Chance(seed, "foo");
chance2 = new Chance(seed, "bar");
_(1000).times(function () {
expect(chance1.random()).to.not.equal(chance2.random());
});
});
});

@@ -316,0 +345,0 @@

@@ -121,24 +121,2 @@ define(['Chance', 'mocha', 'chai', 'underscore'], function (Chance, mocha, chai, _) {

describe("Android Registration ID", function(){
var android_id, chance = new Chance();
it("returns a proper android id", function () {
_(1000).times(function () {
android_id = chance.android_id();
expect(android_id).to.match(/APA91([0-9a-zA-Z-_]){178}/);
});
});
});
describe("Apple Token", function(){
var apple_token, chance = new Chance();
it("returns a proper apple token", function () {
_(1000).times(function () {
apple_token = chance.apple_token();
expect(apple_token).to.match(/([0-9a-fA-F]){64}/);
});
});
});
describe("Guid", function () {

@@ -145,0 +123,0 @@ var guid, chance = new Chance();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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