New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ml-array-sequential-fill

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-array-sequential-fill - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [1.1.2](https://github.com/mljs/array/compare/ml-array-sequential-fill@1.1.1...ml-array-sequential-fill@1.1.2) (2019-08-30)
**Note:** Version bump only for package ml-array-sequential-fill
## [1.1.1](https://github.com/mljs/array/compare/ml-array-sequential-fill@1.1.0...ml-array-sequential-fill@1.1.1) (2018-11-09)

@@ -8,0 +16,0 @@

2

lib/index.js

@@ -52,3 +52,3 @@ 'use strict';

throw new Error(
'sequentialFill typed array must have the correct length'
'sequentialFill typed array must have the correct length',
);

@@ -55,0 +55,0 @@ }

{
"name": "ml-array-sequential-fill",
"version": "1.1.1",
"version": "1.1.2",
"description": "Create an array with sequential numbers",

@@ -26,3 +26,3 @@ "main": "lib/index.js",

},
"gitHead": "fb58ef19baa6cacb075daee5dbbe3cbfe7309dd1"
"gitHead": "6a3b7e1b0fab7f3996b9af3a75d6234a68c9e4d0"
}

@@ -5,15 +5,19 @@ import sequentialFill from '..';

it('default value', () => {
expect(sequentialFill()).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
expect(sequentialFill([])).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
});
it('check options', () => {
expect(sequentialFill([], { from: 0, to: 10, step: 2 })).toEqual([
expect(sequentialFill()).toStrictEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
expect(sequentialFill([])).toStrictEqual([
0,
1,
2,
3,
4,
5,
6,
7,
8,
10
9,
10,
]);
expect(sequentialFill([], { from: 0, to: 10, size: 6 })).toEqual([
});
it('check options', () => {
expect(sequentialFill([], { from: 0, to: 10, step: 2 })).toStrictEqual([
0,

@@ -24,5 +28,5 @@ 2,

8,
10
10,
]);
expect(sequentialFill([1, 2, 3, 4, 5, 6], { from: 0, to: 10 })).toEqual([
expect(sequentialFill([], { from: 0, to: 10, size: 6 })).toStrictEqual([
0,

@@ -33,5 +37,8 @@ 2,

8,
10
10,
]);
expect(sequentialFill([], { from: 0, to: 10, step: 2 })).toEqual([
expect(
sequentialFill([1, 2, 3, 4, 5, 6], { from: 0, to: 10 }),
).toStrictEqual([0, 2, 4, 6, 8, 10]);
expect(sequentialFill([], { from: 0, to: 10, step: 2 })).toStrictEqual([
0,

@@ -42,5 +49,8 @@ 2,

8,
10
10,
]);
expect(sequentialFill(undefined, { from: 0, to: 10, step: 2 })).toEqual([
expect(
sequentialFill(undefined, { from: 0, to: 10, step: 2 }),
).toStrictEqual([0, 2, 4, 6, 8, 10]);
expect(sequentialFill({ from: 0, to: 10, step: 2 })).toStrictEqual([
0,

@@ -51,13 +61,5 @@ 2,

8,
10
10,
]);
expect(sequentialFill({ from: 0, to: 10, step: 2 })).toEqual([
0,
2,
4,
6,
8,
10
]);
expect(sequentialFill([], { from: -1, to: 1, size: 5 })).toEqual([
expect(sequentialFill([], { from: -1, to: 1, size: 5 })).toStrictEqual([
-1,

@@ -67,5 +69,5 @@ -0.5,

0.5,
1
1,
]);
expect(sequentialFill([], { from: 0, to: 0, size: 5 })).toEqual([
expect(sequentialFill([], { from: 0, to: 0, size: 5 })).toStrictEqual([
0,

@@ -75,5 +77,5 @@ 0,

0,
0
0,
]);
expect(sequentialFill([], { from: 1, to: -1, size: 5 })).toEqual([
expect(sequentialFill([], { from: 1, to: -1, size: 5 })).toStrictEqual([
1,

@@ -83,8 +85,8 @@ 0.5,

-0.5,
-1
-1,
]);
expect(
Array.from(sequentialFill(new Uint16Array(4), { from: 0, to: 3 }))
).toEqual([0, 1, 2, 3]);
Array.from(sequentialFill(new Uint16Array(4), { from: 0, to: 3 })),
).toStrictEqual([0, 1, 2, 3]);
});
});

@@ -48,3 +48,3 @@ import isArray from 'is-any-array';

throw new Error(
'sequentialFill typed array must have the correct length'
'sequentialFill typed array must have the correct length',
);

@@ -51,0 +51,0 @@ }

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