ml-array-sequential-fill
Advanced tools
+33
| declare module 'ml-array-sequential-fill' { | ||
| export interface ArraySequentialFillOptions { | ||
| /** | ||
| * First value in the array. | ||
| * @default 0 | ||
| */ | ||
| from?: number; | ||
| /** | ||
| * Last value in the array. | ||
| * @default 10 | ||
| */ | ||
| to?: number; | ||
| /** | ||
| * Size of the array. If not provided, calculated from step. | ||
| */ | ||
| size?: number; | ||
| /** | ||
| * If not provided, calculated from size. | ||
| */ | ||
| step?: number; | ||
| } | ||
| /** | ||
| * Fill an array with sequential numbers. | ||
| */ | ||
| function arraySequentialFill(options?: ArraySequentialFillOptions): number[]; | ||
| function arraySequentialFill<T extends ArrayLike<number>>( | ||
| array: T, | ||
| options?: ArraySequentialFillOptions, | ||
| ): T; | ||
| export = arraySequentialFill; | ||
| } |
+13
-0
@@ -6,2 +6,15 @@ # Change Log | ||
| ## [1.1.3](https://github.com/mljs/array/compare/ml-array-sequential-fill@1.1.2...ml-array-sequential-fill@1.1.3) (2020-10-07) | ||
| ### Bug Fixes | ||
| * add is-any-array dependency ([451f438](https://github.com/mljs/array/commit/451f43807d3d290aefb6f813408438a1121ce2f7)) | ||
| * allow any array in array-normed and array-sequential-fill ([2772ea3](https://github.com/mljs/array/commit/2772ea352c3948b657eb7ae537b04d3e2c287d3d)) | ||
| ## [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) | ||
@@ -8,0 +21,0 @@ |
+5
-2
| import isArray from 'is-any-array'; | ||
| function _typeof(obj) { | ||
| "@babel/helpers - typeof"; | ||
| if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { | ||
@@ -50,3 +52,3 @@ _typeof = function (obj) { | ||
| if (size && step) { | ||
| if (size !== 0 && step) { | ||
| throw new Error('step is defined by the array size'); | ||
@@ -68,3 +70,4 @@ } | ||
| if (Array.isArray(input)) { | ||
| input.length = 0; // only works with normal array | ||
| // only works with normal array | ||
| input.length = 0; | ||
@@ -71,0 +74,0 @@ for (var i = 0; i < size; i++) { |
+3
-2
@@ -29,3 +29,3 @@ 'use strict'; | ||
| if (size && step) { | ||
| if (size !== 0 && step) { | ||
| throw new Error('step is defined by the array size'); | ||
@@ -45,3 +45,4 @@ } | ||
| if (Array.isArray(input)) { | ||
| input.length = 0; // only works with normal array | ||
| // only works with normal array | ||
| input.length = 0; | ||
| for (let i = 0; i < size; i++) { | ||
@@ -48,0 +49,0 @@ input.push(from); |
+0
-0
@@ -0,0 +0,0 @@ MIT License |
+6
-4
| { | ||
| "name": "ml-array-sequential-fill", | ||
| "version": "1.1.2", | ||
| "version": "1.1.3", | ||
| "description": "Create an array with sequential numbers", | ||
| "main": "lib/index.js", | ||
| "module": "lib-es6/index.js", | ||
| "types": "types.d.ts", | ||
| "files": [ | ||
| "lib", | ||
| "lib-es6", | ||
| "src" | ||
| "src", | ||
| "types.d.ts" | ||
| ], | ||
@@ -24,5 +26,5 @@ "repository": { | ||
| "dependencies": { | ||
| "is-any-array": "^0.0.3" | ||
| "is-any-array": "0.1.0" | ||
| }, | ||
| "gitHead": "6a3b7e1b0fab7f3996b9af3a75d6234a68c9e4d0" | ||
| "gitHead": "942138d036d4c0753ad4c261cc692652c0a9cac1" | ||
| } |
+0
-0
@@ -0,0 +0,0 @@ # array-variance |
@@ -0,0 +0,0 @@ import sequentialFill from '..'; |
+3
-2
@@ -25,3 +25,3 @@ import isArray from 'is-any-array'; | ||
| if (size && step) { | ||
| if (size !== 0 && step) { | ||
| throw new Error('step is defined by the array size'); | ||
@@ -41,3 +41,4 @@ } | ||
| if (Array.isArray(input)) { | ||
| input.length = 0; // only works with normal array | ||
| // only works with normal array | ||
| input.length = 0; | ||
| for (let i = 0; i < size; i++) { | ||
@@ -44,0 +45,0 @@ input.push(from); |
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
12760
14.01%9
12.5%297
13.36%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
Updated