Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-xsadd

Package Overview
Dependencies
Maintainers
5
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-xsadd - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

lib-es6/xsadd.js

16

History.md

@@ -0,1 +1,17 @@

<a name="2.0.0"></a>
# [2.0.0](https://github.com/mljs/xsadd/compare/v1.0.0...v2.0.0) (2018-08-11)
### Features
* refactor to have a ES module build and use TypeScript ([#3](https://github.com/mljs/xsadd/issues/3)) ([b326a75](https://github.com/mljs/xsadd/commit/b326a75)), closes [#2](https://github.com/mljs/xsadd/issues/2)
### BREAKING CHANGES
* The initialization now throws if the seed is not an integer.
Stop supporting Node 4.
1.0.0 / 2015-07-23

@@ -2,0 +18,0 @@ ==================

49

package.json
{
"name": "ml-xsadd",
"version": "1.0.0",
"version": "2.0.0",
"description": "JavaScript implementation of the XORSHIFT-ADD (XSadd) pseudo random number generator",
"main": "xsadd-es5.js",
"main": "./lib/xsadd.js",
"module": "./lib-es6/xsadd.js",
"types": "./lib/xsadd.d.ts",
"files": [
"lib",
"lib-es6"
],
"scripts": {
"compile": "babel xsadd.js --out-file xsadd-es5.js",
"prepublish": "npm run compile",
"test": "npm run compile && mocha --require should-approximately-deep --reporter mocha-better-spec-reporter xsadd-test.js"
"clean": "rimraf lib lib-es6",
"prepublishOnly": "npm run tsc",
"test": "npm run test-only && npm run tslint",
"test-only": "jest",
"tsc": "npm run clean && npm run tsc-es5 && npm run tsc-es6",
"tsc-es5": "tsc",
"tsc-es6": "tsc --project tsconfig.es6.json",
"tslint": "tslint --project tsconfig.base.json",
"tslint-fix": "npm run tslint -- --fix"
},

@@ -32,10 +44,25 @@ "repository": {

"homepage": "https://github.com/mljs/xsadd#readme",
"jest": {
"testEnvironment": "node",
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
},
"devDependencies": {
"babel": "^5.8.3",
"mocha": "^2.2.5",
"mocha-better-spec-reporter": "^2.1.1",
"should": "^7.0.2",
"should-approximately-deep": "^1.1.0",
"sprintf": "^0.1.5"
"jest": "^23.5.0",
"rimraf": "^2.6.2",
"ts-jest": "^23.1.3",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.14.0",
"typescript": "^3.0.1"
}
}

@@ -1,6 +0,11 @@

# ml-xsadd
JavaScript implementation of the XORSHIFT-ADD (XSadd) pseudo random number generator
# xsadd
Based on the C code from https://github.com/MersenneTwister-Lab/XSadd
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![npm download][download-image]][download-url]
JavaScript implementation of the XORSHIFT-ADD (XSadd) pseudo random number generator.
Based on the C code from https://github.com/MersenneTwister-Lab/XSadd.
## Installation

@@ -18,11 +23,11 @@

Returns a 32-bit integer r (0 <= r < 2^32)
Returns a 32-bit integer r (0 <= r < 2^32).
### getFloat()
Returns a floating point number r (0.0 <= r < 1.0)
Returns a floating point number r (0.0 <= r < 1.0).
### random()
Like `getFloat()` but dynamically bound to the `XSadd` instance.
Like `getFloat()` but dynamically bound to the `XSadd` instance.
You can use this function externally, like `Math.random`:

@@ -36,4 +41,15 @@

### init(seed)
Reinitialize the generator with a new seed.
## LICENSE
[MIT](./LICENSE)
[npm-image]: https://img.shields.io/npm/v/ml-xsadd.svg?style=flat-square
[npm-url]: https://npmjs.org/package/ml-xsadd
[travis-image]: https://img.shields.io/travis/mljs/xsadd/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/mljs/xsadd
[download-image]: https://img.shields.io/npm/dm/ml-xsadd.svg?style=flat-square
[download-url]: https://npmjs.org/package/ml-xsadd
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