Comparing version 2.5.1 to 2.6.0
@@ -96,3 +96,7 @@ 'use strict'; | ||
value: function value(action) { | ||
return new Dodo(Arrays.get(this), this[meta].index, [].concat(_toConsumableArray(this.actions), [action])); | ||
if (action) { | ||
return new Dodo(Arrays.get(this), this[meta].index, [].concat(_toConsumableArray(this.actions), [action])); | ||
} else { | ||
return new Dodo(Arrays.get(this), this[meta].index, [].concat(_toConsumableArray(this.actions))); | ||
} | ||
} | ||
@@ -191,3 +195,4 @@ }, { | ||
value: function skip(amount) { | ||
(0, _invariant2.default)(amount, 'Dodo#skip(amount) - amount is required'); | ||
(0, _invariant2.default)(Number.isFinite(amount), 'Dodo#skip(amount) - amount must be a number'); | ||
if (amount === 0) return this[action](); | ||
(0, _invariant2.default)(amount > 0, 'Dodo#skip(amount) — amount smaller than 0'); | ||
@@ -199,4 +204,4 @@ return this[action]((0, _transducers.drop)(amount)); | ||
value: function take(amount) { | ||
(0, _invariant2.default)(amount, 'Dodo#take(amount) - amount is required'); | ||
(0, _invariant2.default)(amount > 0, 'Dodo#take(amount) — amount smaller than 0'); | ||
(0, _invariant2.default)(Number.isFinite(amount), 'Dodo#take(amount) - amount must be a number'); | ||
(0, _invariant2.default)(amount >= 0, 'Dodo#take(amount) — amount smaller than 0'); | ||
return this[action]((0, _transducers.take)(amount)); | ||
@@ -384,6 +389,6 @@ } | ||
var key = _step$value[0]; | ||
var dodo = _step$value[1]; | ||
var _key3 = _step$value[0]; | ||
var _dodo = _step$value[1]; | ||
map.set(key, dodo[method].apply(dodo, _toConsumableArray(args))); | ||
map.set(_key3, _dodo[method].apply(_dodo, _toConsumableArray(args))); | ||
} | ||
@@ -415,4 +420,4 @@ } catch (err) { | ||
map[method] = function () { | ||
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
for (var _len3 = arguments.length, args = Array(_len3), _key4 = 0; _key4 < _len3; _key4++) { | ||
args[_key4] = arguments[_key4]; | ||
}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lkZW50aXR5XSxcbiAgY291bnRVbmlxOiBbKHNldCwgZWwpID0+IHNldC5hZGQoZWwpLCAoKSA9PiBuZXcgU2V0KCksIHNldCA9PiBzZXQuc2l6ZV0sXG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVHcm91cGVyKG1hcCwgZm4sIGNvbCkge1xuICBpZiAoZm4pIHtcbiAgICByZXR1cm4gZnVuY3Rpb24ocm93KSB7XG4gICAgICBjb25zdCBrZXkgPSBmbihyb3dbY29sXSlcbiAgICAgIG1hcC5oYXMoa2V5KVxuICAgICAgICA/IG1hcC5nZXQoa2V5KS5wdXNoKHJvdylcbiAgICAgICAgOiBtYXAuc2V0KGtleSwgW3Jvd10pXG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHJldHVybiBmdW5jdGlvbihyb3cpIHtcbiAgICAgIGNvbnN0IGtleSA9IHJvd1tjb2xdXG4gICAgICBtYXAuaGFzKGtleSlcbiAgICAgICAgPyBtYXAuZ2V0KGtleSkucHVzaChyb3cpXG4gICAgICAgIDogbWFwLnNldChrZXksIFtyb3ddKVxuICAgIH1cbiAgfVxufVxuXG5leHBvcnQgY29uc3QgaXNmdW5jID0gZm4gPT4gZm4gJiYgdHlwZW9mIGZuID09ICdmdW5jdGlvbidcbmV4cG9ydCBjb25zdCBhcnJheVRvSW5kZXggPSBhcnIgPT4gemlwT2JqZWN0KGFyciwgWy4uLmFyci5rZXlzKCldKVxuIl19 |
{ | ||
"name": "dodos", | ||
"version": "2.5.1", | ||
"version": "2.6.0", | ||
"description": "Pandas-inspired iterator-based data wrangling library for js", | ||
@@ -45,5 +45,5 @@ "main": "lib/dodo.js", | ||
"d3-dsv": "~0.3.1", | ||
"eslint": "~2.5.1", | ||
"eslint": "~2.6.0", | ||
"husky": "~0.11.4", | ||
"npm-check": "~4.1.4", | ||
"npm-check": "~5.1.1", | ||
"nyc": "~6.1.1", | ||
@@ -50,0 +50,0 @@ "rimraf": "~2.5.2", |
@@ -79,4 +79,9 @@ import invariant from 'invariant' | ||
[action](action) { | ||
return new Dodo( | ||
Arrays.get(this), this[meta].index, [...this.actions, action]) | ||
if (action) { | ||
return new Dodo( | ||
Arrays.get(this), this[meta].index, [...this.actions, action]) | ||
} else { | ||
return new Dodo( | ||
Arrays.get(this), this[meta].index, [...this.actions]) | ||
} | ||
} | ||
@@ -137,3 +142,4 @@ | ||
skip(amount) { | ||
invariant(amount, `Dodo#skip(amount) - amount is required`) | ||
invariant(Number.isFinite(amount), `Dodo#skip(amount) - amount must be a number`) | ||
if (amount === 0) return this[action]() | ||
invariant(amount > 0, `Dodo#skip(amount) — amount smaller than 0`) | ||
@@ -144,4 +150,4 @@ return this[action](drop(amount)) | ||
take(amount) { | ||
invariant(amount, `Dodo#take(amount) - amount is required`) | ||
invariant(amount > 0, `Dodo#take(amount) — amount smaller than 0`) | ||
invariant(Number.isFinite(amount), `Dodo#take(amount) - amount must be a number`) | ||
invariant(amount >= 0, `Dodo#take(amount) — amount smaller than 0`) | ||
return this[action](take(amount)) | ||
@@ -148,0 +154,0 @@ } |
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
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
162402
3227
3