chance-generators
Advanced tools
Comparing version 3.5.0 to 3.5.1
@@ -0,1 +1,5 @@ | ||
### v3.5.1 (2018-12-02) | ||
- [#31](https://github.com/sunesimonsen/chance-generators/pull/31) Fix check for magic values in the number generator ([Sune Simonsen](mailto:sune@we-knowhow.dk)) | ||
### v3.5.0 (2018-11-27) | ||
@@ -2,0 +6,0 @@ |
"use strict"; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -19,6 +21,2 @@ | ||
var _require = require("./magicValues"), | ||
getMagicIntegers = _require.getMagicIntegers, | ||
getMagicFloating = _require.getMagicFloating; | ||
var NumberGenerator = function (_Generator) { | ||
@@ -43,2 +41,4 @@ _inherits(NumberGenerator, _Generator); | ||
var hasInstrumentation = (typeof global === "undefined" ? "undefined" : _typeof(global)) === "object" && Boolean(global.recordLocation); | ||
if (floating) { | ||
@@ -50,3 +50,3 @@ options.floating = true; | ||
if (getMagicFloating().length) { | ||
if (hasInstrumentation) { | ||
generators.push([new MagicFloatingGenerator(), 5]); | ||
@@ -63,3 +63,3 @@ } | ||
if (getMagicIntegers().length) { | ||
if (hasInstrumentation) { | ||
generators.push([new MagicIntegerGenerator(), 5]); | ||
@@ -66,0 +66,0 @@ generators.push([new MagicIntegerGenerator().map(function (v) { |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"main": "lib/index.js", | ||
@@ -9,0 +9,0 @@ "files": [ |
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
189012
3659