multiple-define

1.0.1 • Public • Published

multiple-define

Define multiple non-enumerable properties

example

import multipleDefine from 'multiple-define'
 
const foo = {}
const bar = {a: 1, b: 2}
 
multipleDefine(foo, bar, ['b'])
 
foo // {b: 2}
bar // {a: 1, b: 2}

multiple-define is an umd module

import md from 'multiple-define'
var md2 = require 'multiple-define'
 
if (window) {
    window.multipleDefine === md === md2  // true
}

Package Sidebar

Install

npm i multiple-define

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

3.98 kB

Total Files

8

Last publish

Collaborators

  • hjdtl