| Server IP : 203.96.225.131 / Your IP : 216.73.216.19 Web Server : nginx/1.24.0 System : Linux iot1 6.8.0-151-generic #151-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 11 01:28:36 UTC 2026 x86_64 User : papel ( 1002) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /dma/project-211/project/mapbd/node_modules/require/node_modules/std/ |
Upload File : |
/*
Example usage:
var A = Class(function() {
var defaults = {
foo: 'cat',
bar: 'dum'
}
this._init = function(opts) {
opts = std.extend(opts, defaults)
this._foo = opts.foo
this._bar = opts.bar
}
this.getFoo = function() {
return this._foo
}
this.getBar = function() {
return this._bar
}
})
var a = new A({ bar:'sim' })
a.getFoo() == 'cat'
a.getBar() == 'sim'
*/
module.exports = function extend(target, extendWith) {
target = target || {}
for (var key in extendWith) {
if (typeof target[key] != 'undefined') { continue }
target[key] = extendWith[key]
}
return target
}