@borderless/assign
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.1 • Public • Published

    Assign

    NPM version NPM downloads Build status Test coverage

    Tiny, opinionated deep assign implementation.

    Installation

    npm install @borderless/assign --save

    Usage

    import { assign } from "@borderless/assign";
    
    // Merges objects.
    assign({ a: 10 }, { b: 10 }); //=> { a: 10, b: 10 }
    
    // Deep merge of objects.
    assign({ a: { b: true }, { a: { c: false } }); //=> { a: { b: true, c: false } }
    
    // Pushes to arrays, overwrites primitives.
    assign({ a: 10, b: [1] }, { a: 20, b: [2, 3] }); //=> { a: 20, b: [1, 2, 3] }

    License

    MIT

    Install

    npm i @borderless/assign

    DownloadsWeekly Downloads

    3

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    34.2 kB

    Total Files

    13

    Last publish

    Collaborators

    • blakeembrey