Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function ConfigChain () {
EE.apply(this)
ProtoList.apply(this, arguments)
this._awaiting = 0
this._saving = 0
this.sources = {}
}
// multi-inheritance-ish
var extras = {
constructor: { value: ConfigChain }
}
Object.keys(EE.prototype).forEach(function (k) {
extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k)
})
ConfigChain.prototype = Object.create(ProtoList.prototype, extras)
ConfigChain.prototype.del = function (key, where) {
// if not specified where, then delete from the whole chain, scorched
// earth style
if (where) {
var target = this.sources[where]
target = target && target.data
if (!target) {
return this.emit('error', new Error('not found '+where))
}
delete target[key]
} else {
for (var i = 0, l = this.list.length; i < l; i ++) {
delete this.list[i][key]
}
}
function ConfigChain () {
EE.apply(this)
ProtoList.apply(this, arguments)
this._awaiting = 0
this._saving = 0
this.sources = {}
}
// multi-inheritance-ish
var extras = {
constructor: { value: ConfigChain }
}
Object.keys(EE.prototype).forEach(function (k) {
extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k)
})
ConfigChain.prototype = Object.create(ProtoList.prototype, extras)
ConfigChain.prototype.del = function (key, where) {
// if not specified where, then delete from the whole chain, scorched
// earth style
if (where) {
var target = this.sources[where]
target = target && target.data
if (!target) {
return this.emit('error', new Error('not found '+where))
}
delete target[key]
} else {
for (var i = 0, l = this.list.length; i < l; i ++) {
delete this.list[i][key]
}
}
function ConfigChain () {
EE.apply(this)
ProtoList.apply(this, arguments)
this._awaiting = 0
this._saving = 0
this.sources = {}
}
function ConfigChain () {
EE.apply(this)
ProtoList.apply(this, arguments)
this._awaiting = 0
this._saving = 0
this.sources = {}
}