cds-namespace
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -10,9 +10,3 @@ /** | ||
ns.import(path.join(__dirname, "./api"), function (msg) { | ||
return { | ||
use: function () { | ||
console.log('....') | ||
} | ||
} | ||
}); | ||
ns.import(path.join(__dirname, "./api"),'你好'); | ||
@@ -19,0 +13,0 @@ var classA = ns.ns('api.demo.hello') |
@@ -16,3 +16,5 @@ /** | ||
import(dirpath) { | ||
import() { | ||
let tmpArray = [].slice.call(arguments); | ||
let dirpath = tmpArray.shift(); | ||
if (this.imports[dirpath]) { | ||
@@ -28,3 +30,4 @@ return; | ||
if ('function' == typeof(fn)) { | ||
fn(self.ns.bind(self)) | ||
// fn(self.ns.bind(self)) | ||
fn.apply(this, [self.ns.bind(self)].concat(tmpArray)); | ||
} else { | ||
@@ -31,0 +34,0 @@ debug(`...文件 ${item} 是加载进来了,但是我特么的该怎么处理~`) |
{ | ||
"name": "cds-namespace", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "namespace", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
71811
101