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

@mstream/di

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mstream/di - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

.prettierignore

1

.eslintrc.json

@@ -7,2 +7,3 @@ {

},
"ignorePatterns": ["CHANGELOG.md"],
"parserOptions": {

@@ -9,0 +10,0 @@ "ecmaVersion": 2021,

@@ -5,2 +5,4 @@ # Changelog

### 2.0.1 (2023-01-18)
## 2.0.0 (2023-01-18)

@@ -7,0 +9,0 @@

9

package.json
{
"name": "@mstream/di",
"version": "2.0.0",
"version": "2.0.1",
"description": "",

@@ -9,2 +9,6 @@ "private": false,

"scripts": {
"format:docs": "prettier --write docs",
"format": "npm run format:docs",
"generate:docs": "rm -f docs/REFERENCE.md && jsdoc2md src/index.js > docs/REFERENCE.md && npm run format:docs",
"generate": "npm run generate:docs",
"lint:commits": "commitlint --to HEAD",

@@ -36,3 +40,4 @@ "lint:example": "cd example && npm run lint",

"eslint": "^8",
"eslint-config-prettier": "^8.6.0",
"eslint-config-prettier": "^8",
"jsdoc-to-markdown": "^8",
"markdown-link-check": "^3",

@@ -39,0 +44,0 @@ "prettier": "^2",

@@ -5,2 +5,6 @@ # DI

## Documentation
- [reference](docs/REFERENCE.md)
## Usage Examples

@@ -7,0 +11,0 @@

@@ -0,1 +1,35 @@

/**
* @module
*/
/**
* @typedef {function} BuildFn
* @returns {object}
*/
/**
* @typedef {function} RegisterFn
* @param {string} name
* @param {function} creator
* @returns {ContextBuilder}
*/
/**
* @typedef {function} RegisterEagerFn
* @param {string} name
* @param {function} creator
* @returns {ContextBuilder}
*/
/**
* @typedef {object} ContextBuilder
* @property {BuildFn} build - builds a context with registered dependencies inside it
* @property {RegisterFn} register - register a depenency
* @property {RegisterEagerFn} registerEager - registers an eager dependency
*/
/** Creates a builder which allow to register
* dependency creators.
* @returns {ContextBuilder}
*/
export function contextBuilder() {

@@ -46,3 +80,7 @@ let wasBuilt = false

return { build, register, registerEager }
return {
build,
register,
registerEager,
}
}

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