@@ -56,3 +56,3 @@ "use strict"; | ||
| const arr3 = new Array(); | ||
| for (let i = start; i < length; i++) { | ||
| for (let i = start; i < start + length; i++) { | ||
| const arr1_item = arr1[i]; | ||
@@ -59,0 +59,0 @@ const arr2_item = arr2[i]; |
+2
-0
@@ -0,1 +1,3 @@ | ||
| import { pair } from "./array-pair"; | ||
| export * from "./array-pair"; | ||
| export default pair; |
+2
-0
@@ -6,2 +6,4 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| const array_pair_1 = require("./array-pair"); | ||
| __export(require("./array-pair")); | ||
| exports.default = array_pair_1.pair; |
+2
-1
@@ -5,3 +5,3 @@ { | ||
| "author": "George Thomas", | ||
| "version": "0.1.0", | ||
| "version": "0.5.0", | ||
| "homepage": "https://github.com/mgthomas99/array-pair/blob/master/README.md", | ||
@@ -27,2 +27,3 @@ "license": "MIT", | ||
| "upload-test": "npm-run-all -s \"report\" \"codecov -f coverage/*.json -t \"", | ||
| "prepublish": "npm-run-all -s \"build\"", | ||
| "pretest": "npm-run-all -s \"build\"" | ||
@@ -29,0 +30,0 @@ }, |
+66
-1
@@ -0,4 +1,69 @@ | ||
| [circleci-url]: https://circleci.com/gh/mgthomas99/array-pair | ||
| [circleci-shield-url]: https://img.shields.io/circleci/project/github/mgthomas99/array-pair.svg | ||
| [npm-url]: https://www.npmjs.com/package/array-pair | ||
| [npm-shield-url]: https://img.shields.io/npm/v/array-pair.svg | ||
| [license-url]: https://github.com/mgthomas99/array-pair/blob/master/LICENSE | ||
| [license-shield-url]: https://img.shields.io/npm/l/array-pair.svg | ||
| array-pair | ||
| ========== | ||
| JavaScript array pairing and merging techniques. | ||
| [![NPM][npm-shield-url]][npm-url] | ||
| [![NPM][license-shield-url]][license-url] | ||
| [![CircleCI][circleci-shield-url]][circleci-url] | ||
| JavaScript array pairing and merging function written in TypeScript with 100% | ||
| code coverage and strict typing definitions. | ||
| ## Usage | ||
| ```sh | ||
| npm install array-pair --save | ||
| ``` | ||
| ```js | ||
| var expect = require("chai").expect; | ||
| var pair = require("array-pair"); | ||
| var names = [ "Bob", "John", "Joe" ]; | ||
| var ages = [ 43, 28, 21 ]; | ||
| var merged = pair(names, ages); | ||
| expect(merged).to.deep.equals([ | ||
| [ "Bob", 43 ], | ||
| [ "John", 28 ], | ||
| [ "Joe", 21 ] | ||
| ]); | ||
| ``` | ||
| ## Build & Develop | ||
| ```sh | ||
| npm run build # Invoke the build process via NPM script proxy. | ||
| gulp build # Invoke the build process directly via Gulp. | ||
| ``` | ||
| ### Testing | ||
| `array-pair` uses a combination of `mocha` and `chai` for local code tests, and | ||
| CircleCI for continuous integration. | ||
| `array-pair` is written in TypeScript, but its tests are written in JavaScript | ||
| as this removes dependencies and makes continuous integration much easier. The | ||
| disadvantage is that this requires `array-pair` to be built before it can be | ||
| tested. | ||
| To test `array-pair`, run the following npm script: | ||
| ```sh | ||
| npm test | ||
| ``` | ||
| The command will invoke the build process and await its completion before | ||
| executing the tests. The tests will emit coverage reports and temporary | ||
| information to files in the folders `.nyc_output/` and `coverage/` for upload | ||
| to a code coverage manager such as CodeCov. | ||
| ## License | ||
| See the `LICENSE` file for license information. |
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
8210
33.98%125
3.31%70
1300%