Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cds-namespace

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cds-namespace - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

8

example/index.js

@@ -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')

7

lib/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc