Noisy Pillaging Monster

    @undercut/node-10

    0.6.1 • Public • Published

    @undercut/node-10

    downloads circleci codecov license

    A precompiled CommonJS version of the Undercut packages for Node.js 10 LTS and upward. Contains pull, push, and utils entries. An easy way to try Undercut when your project has no build step or you're doing a quick experiment.

    Lazy data processing, pipelines, and language utilities built around native JS features and protocols.

    • Based on existing JS protocols and language features
    • Balanced API: not too imperative, not too functional
    • Various language utilities to use as a Standard Library
    • Composability and extensibility by design
    • Custom operations in a couple of lines
    • Lazy evaluation when possible
    • No external dependencies
    • TypeScript in JSDoc

    Please visit undercut.js.org for broader overview and documentation.

    Usage

    Usage is similar to the original ESM packages.

    const { pullArray, filter, map, skip } = require("@undercut/node-10/pull");
    
    const source = [1, 2, 3, 4, 5, 6, 7];
    
    const result = pullArray([
        skip(2),
        filter(x => x % 3),
        map(x => x * 2) // Will be executed only 3 times.
    ], source);
    
    console.log(result); // [8, 10, 14]
    const { isNumberValue } = require("@undercut/node-10/utils");
    
    console.log(isNumberValue(123)); // true
    console.log(isNumberValue("hello")); // false
    console.log(isNumberValue(NaN)); // false

    Prerequisites

    You may need to import core-js@3 (or another similar polyfill) before you import Undercut:

    // index.js
    require("core-js/es");

    Installation

    npm install @undercut/node-10
    # or
    yarn add @undercut/node-10

    You may also try Yarn aliases for convenience:

    yarn add undercut@npm:@undercut/node-10

    Updating

    If you're upgrading @undercut/node-10 to a newer version, please upgrade core-js to the latest version too.

    License

    Licensed under the MIT License, see LICENSE for more information.

    Install

    npm i @undercut/node-10

    DownloadsWeekly Downloads

    14

    Version

    0.6.1

    License

    MIT

    Unpacked Size

    266 kB

    Total Files

    9

    Last publish

    Collaborators

    • spyke