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

pang

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pang - npm Package Compare versions

Comparing version 0.5.8 to 0.5.9

7

index.d.ts

@@ -1,2 +0,3 @@

declare module pang {
/// <reference path="../src/references/node.d.ts" />
declare module pang {
class Dependency {

@@ -13,4 +14,7 @@ public domain: Domain;

class Domain {
private fs;
private path;
private dependencies;
constructor();
public config(name: string, filename: string): Domain;
public factory(name: string, initializer: (...args: any[]) => any): Domain;

@@ -26,2 +30,1 @@ public singleton(name: string): any;

}
declare var module: any;

@@ -21,2 +21,3 @@ /*--------------------------------------------------------------------------

---------------------------------------------------------------------------*/
/// <reference path="references/node.d.ts" />
var pang;

@@ -59,5 +60,21 @@ (function (pang) {

function Domain() {
this.fs = require('fs');
this.path = require('path');
this.dependencies = [];
}
//----------------------------------------------
// create config dependency
//----------------------------------------------
Domain.prototype.config = function (name, filename) {
var _this = this;
this.dependencies.push(new Dependency(this, name, [], function () {
var directory = _this.path.dirname(filename);
return JSON.parse(_this.fs.readFileSync(filename, 'utf8').replace(new RegExp('~', 'g'), directory).replace(new RegExp('/\\/', 'g'), '/'));
}, false, null));
return this;
};
//----------------------------------------------
// create a new dependency

@@ -181,3 +198,5 @@ //----------------------------------------------

//-----------------------------
// export
//-----------------------------
module.exports = pang;
{
"name": "pang",
"version": "0.5.8",
"version": "0.5.9",
"description": "A simple dependency injection library for node",

@@ -5,0 +5,0 @@ "main": "index.js",

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