Nincompoops Producing Methane

    array.merge

    0.1.1 • Public • Published

    Array merge

    How to use?

    Merge

    import merge from 'array.merge'; 
    
    const acture = merge('a');   // return ['a']
    const acture = merge(['a']); // return ['a']
    const acture = merge(['a'], ['b']); // return ['a', 'b']
    const acture = merge('a', ['b']);   // return ['a', 'b']
    const acture = merge('a', 'b');     // return ['a', 'b']
    const acture = merge(['a'], ['b'], ['c']);    // return ['a', 'b', 'c']
    

    combine

    import {combine} from 'array.merge'; 
    const arr = {
      foo: ['a', 'b', 'c'],
      bar: ['d', 'e', 'f']
    };
    
    const acture = combine(arr);
    /** return 
    * [
    *   {foo: 'a', bar: 'd'},
    *   {foo: 'b', bar: 'e'},
    *   {foo: 'c', bar: 'f'},
    * ]
    */
    

    Keywords

    Install

    npm i array.merge

    DownloadsWeekly Downloads

    201

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    19 kB

    Total Files

    16

    Last publish

    Collaborators

    • hillliu