immutable-array-methods
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -25,1 +25,2 @@ "use strict"; | ||
}; | ||
exports.default = { push: push, pop: pop, shift: shift, unshift: unshift, splice: splice }; |
@@ -7,1 +7,2 @@ export const push = (array, value) => array.concat([value]); | ||
array.slice(0, start).concat(items).concat(array.slice(start + deleteCount)); | ||
export default {push, pop, shift, unshift, splice}; |
{ | ||
"name": "immutable-array-methods", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Immutable versions of normally mutable array methods, such as pop(), push(), splice()", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import test from 'ava'; | ||
import 'babel-core/register'; | ||
import {push, pop, unshift, shift, splice} from './index'; | ||
import arrayMethods from './index'; | ||
@@ -27,1 +28,9 @@ test('push()', t => { | ||
}); | ||
test('default import', t => { | ||
t.is(arrayMethods.push, push); | ||
t.is(arrayMethods.unshift, unshift); | ||
t.is(arrayMethods.pop, pop); | ||
t.is(arrayMethods.shift, shift); | ||
t.is(arrayMethods.splice, splice); | ||
}); |
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
5088
70