Comparing version 0.0.0 to 0.0.1
61
index.js
@@ -1,48 +0,13 @@ | ||
(function() { | ||
!function() { | ||
var d3 = { | ||
version: "3.4.4" | ||
}; | ||
d3.random = { | ||
normal: function(µ, σ) { | ||
var n = arguments.length; | ||
if (n < 2) σ = 1; | ||
if (n < 1) µ = 0; | ||
return function() { | ||
var x, y, r; | ||
do { | ||
x = Math.random() * 2 - 1; | ||
y = Math.random() * 2 - 1; | ||
r = x * x + y * y; | ||
} while (!r || r > 1); | ||
return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r); | ||
}; | ||
}, | ||
logNormal: function() { | ||
var random = d3.random.normal.apply(d3, arguments); | ||
return function() { | ||
return Math.exp(random()); | ||
}; | ||
}, | ||
bates: function(m) { | ||
var random = d3.random.irwinHall(m); | ||
return function() { | ||
return random() / m; | ||
}; | ||
}, | ||
irwinHall: function(m) { | ||
return function() { | ||
for (var s = 0, j = 0; j < m; j++) s += Math.random(); | ||
return s; | ||
}; | ||
} | ||
}; | ||
if (typeof define === "function" && define.amd) { | ||
define(d3); | ||
} else if (typeof module === "object" && module.exports) { | ||
module.exports = d3; | ||
} else { | ||
this.d3 = d3; | ||
} | ||
}(); | ||
})(); | ||
import uniform from "./src/uniform"; | ||
import normal from "./src/normal"; | ||
import logNormal from "./src/logNormal"; | ||
import bates from "./src/bates"; | ||
import irwinHall from "./src/irwinHall"; | ||
export { | ||
uniform, | ||
normal, | ||
logNormal, | ||
bates, | ||
irwinHall | ||
}; |
{ | ||
"name": "d3-random", | ||
"version": "0.0.0", | ||
"description": "The d3.random function from d3", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "smash node_modules/d3/src/start.js node_modules/d3/src/math/random.js node_modules/d3/src/end.js | uglifyjs - -b -indent-level=2 -o index.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"version": "0.0.1", | ||
"description": "Generate random numbers from various distributions.", | ||
"keywords": [ | ||
"d3", | ||
"random", | ||
"rng" | ||
], | ||
"homepage": "https://github.com/d3/d3-random", | ||
"license": "BSD-3-Clause", | ||
"author": { | ||
"name": "Mike Bostock", | ||
"url": "http://bost.ocks.org/mike" | ||
}, | ||
"main": "build/random", | ||
"jsnext:main": "index", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jfsiii/d3-random.git" | ||
"url": "https://github.com/d3/d3-random.git" | ||
}, | ||
"keywords": [ | ||
"d3" | ||
], | ||
"author": "JFSIII", | ||
"license": "ISC", | ||
"scripts": { | ||
"pretest": "mkdir -p build && d3-bundler --format=umd --name=random -- index.js > build/random.js", | ||
"test": "faucet `find test -name '*-test.js'`", | ||
"prepublish": "npm run test && uglifyjs build/random.js -c -m -o build/random.min.js" | ||
}, | ||
"devDependencies": { | ||
"d3": "^3.4.4", | ||
"smash": "0.0.12", | ||
"uglify-js": "^2.4.13" | ||
"d3-arrays": "~0.0.3", | ||
"d3-bundler": "~0.2.6", | ||
"faucet": "0.0", | ||
"seedrandom": "2", | ||
"tape": "4", | ||
"uglifyjs": "2" | ||
} | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
10368
13
166
1
0
35
6
2