Package Exports
- define-configurable
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (define-configurable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
define-configurable
Defines new (or modifies existing) properties using Object.defineProperty on an object passed to define as this, setting configurable by default
--
Simple
const define = require('define-configurable')
const subject = {}
const props = [
{ one: true },
{ two () {
console.log('do nothing')
}
}
]
define.apply(subject, props)
Extend
const define = require('define-configurable')
const subject = {
search (arg) {}
}
define.apply(subject, {
extend: {
// optmized method for extending up till 7 arguments
search (method, arg) {
return method.call(this, arg)
}
}
})