vigour-util
Advanced tools
Comparing version 3.0.5 to 3.1.0
@@ -42,7 +42,16 @@ 'use strict' | ||
for (let key in val) { | ||
if (typeof val[key] !== 'function') { | ||
let type = typeof val[key] | ||
if (type === 'object') { | ||
let value = {} | ||
let obj = val[key] | ||
for (let i in obj) { | ||
value[i] = createExtension(obj[i], target[key][i]) | ||
} | ||
val[key] = (target.define || define).call(target, { [key]: { value } }) | ||
} else if (type !== 'function') { | ||
throw new Error(`Expect function for extension "${key}"`) | ||
} else { | ||
val[key] = (target.define || define) | ||
.call(target, { [key]: createExtension(val[key], target[key]) }) | ||
} | ||
val[key] = (target.define || define) | ||
.call(target, { [key]: createExtension(val[key], target[key]) }) | ||
} | ||
@@ -49,0 +58,0 @@ } |
{ | ||
"name": "vigour-util", | ||
"version": "3.0.5", | ||
"version": "3.1.0", | ||
"author": "Vigour.io <dev@vigour.io>", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -1,2 +0,2 @@ | ||
'use strict' | ||
'use strict' | ||
var Module = require('module') | ||
@@ -3,0 +3,0 @@ var assert = require('assert') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85323
2048