New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

array-pair

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-pair

Pair two arrays, or pair a single array's contents

latest
Source
npmnpm
Version
0.5.0
Version published
Maintainers
1
Created
Source

array-pair

NPM NPM CircleCI

JavaScript array pairing and merging function written in TypeScript with 100% code coverage and strict typing definitions.

Usage

    npm install array-pair --save
    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

    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:

    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.

Keywords

array

FAQs

Package last updated on 28 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts