@loopback/context
Advanced tools
Comparing version 4.0.0-alpha.12 to 4.0.0-alpha.13
@@ -1,1 +0,10 @@ | ||
export * from './src'; | ||
export { Binding, BindingScope, BoundValue, ValueOrPromise } from './binding'; | ||
export { Context } from './context'; | ||
export { Constructor } from './resolver'; | ||
export { inject, Setter, Getter } from './inject'; | ||
export { NamespacedReflect } from './reflect'; | ||
export { Provider } from './provider'; | ||
export { isPromise } from './is-promise'; | ||
export { instantiateClass } from './resolver'; | ||
export { describeInjectedArguments, describeInjectedProperties, Injection } from './inject'; | ||
export { Reflector } from './reflect'; |
"use strict"; | ||
// Copyright IBM Corp. 2013,2017. All Rights Reserved. | ||
// Node module: @loopback/context | ||
// Copyright IBM Corp. 2017. All Rights Reserved. | ||
// Node module: loopback | ||
// This file is licensed under the MIT License. | ||
// License text available at https://opensource.org/licenses/MIT | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// NOTE(bajtos) This file is used by VSCode/TypeScriptServer at dev time only | ||
__export(require("./src")); | ||
var binding_1 = require("./binding"); | ||
exports.Binding = binding_1.Binding; | ||
exports.BindingScope = binding_1.BindingScope; | ||
var context_1 = require("./context"); | ||
exports.Context = context_1.Context; | ||
var inject_1 = require("./inject"); | ||
exports.inject = inject_1.inject; | ||
var reflect_1 = require("./reflect"); | ||
exports.NamespacedReflect = reflect_1.NamespacedReflect; | ||
var is_promise_1 = require("./is-promise"); | ||
exports.isPromise = is_promise_1.isPromise; | ||
// internals for testing | ||
var resolver_1 = require("./resolver"); | ||
exports.instantiateClass = resolver_1.instantiateClass; | ||
var inject_2 = require("./inject"); | ||
exports.describeInjectedArguments = inject_2.describeInjectedArguments; | ||
exports.describeInjectedProperties = inject_2.describeInjectedProperties; | ||
var reflect_2 = require("./reflect"); | ||
exports.Reflector = reflect_2.Reflector; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,10 @@ | ||
export * from './src'; | ||
export { Binding, BindingScope, BoundValue, ValueOrPromise } from './binding'; | ||
export { Context } from './context'; | ||
export { Constructor } from './resolver'; | ||
export { inject, Setter, Getter } from './inject'; | ||
export { NamespacedReflect } from './reflect'; | ||
export { Provider } from './provider'; | ||
export { isPromise } from './is-promise'; | ||
export { instantiateClass } from './resolver'; | ||
export { describeInjectedArguments, describeInjectedProperties, Injection } from './inject'; | ||
export { Reflector } from './reflect'; |
"use strict"; | ||
// Copyright IBM Corp. 2013,2017. All Rights Reserved. | ||
// Node module: @loopback/context | ||
// Copyright IBM Corp. 2017. All Rights Reserved. | ||
// Node module: loopback | ||
// This file is licensed under the MIT License. | ||
// License text available at https://opensource.org/licenses/MIT | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// NOTE(bajtos) This file is used by VSCode/TypeScriptServer at dev time only | ||
__export(require("./src")); | ||
var binding_1 = require("./binding"); | ||
exports.Binding = binding_1.Binding; | ||
exports.BindingScope = binding_1.BindingScope; | ||
var context_1 = require("./context"); | ||
exports.Context = context_1.Context; | ||
var inject_1 = require("./inject"); | ||
exports.inject = inject_1.inject; | ||
var reflect_1 = require("./reflect"); | ||
exports.NamespacedReflect = reflect_1.NamespacedReflect; | ||
var is_promise_1 = require("./is-promise"); | ||
exports.isPromise = is_promise_1.isPromise; | ||
// internals for testing | ||
var resolver_1 = require("./resolver"); | ||
exports.instantiateClass = resolver_1.instantiateClass; | ||
var inject_2 = require("./inject"); | ||
exports.describeInjectedArguments = inject_2.describeInjectedArguments; | ||
exports.describeInjectedProperties = inject_2.describeInjectedProperties; | ||
var reflect_2 = require("./reflect"); | ||
exports.Reflector = reflect_2.Reflector; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@loopback/context", | ||
"version": "4.0.0-alpha.12", | ||
"version": "4.0.0-alpha.13", | ||
"description": "LoopBack's container for Inversion of Control", | ||
@@ -25,3 +25,3 @@ "scripts": { | ||
"devDependencies": { | ||
"@loopback/testlab": "^4.0.0-alpha.7", | ||
"@loopback/testlab": "^4.0.0-alpha.8", | ||
"@types/bluebird": "^3.5.8", | ||
@@ -28,0 +28,0 @@ "bluebird": "^3.5.0" |
@@ -7,3 +7,3 @@ # @loopback/context | ||
LoopBack implements the concept of a Context to represent a global registry in your application to manage config, state, dependencies, classes, etc. Context also serves as an IoC container used to inject dependencies into your code. | ||
LoopBack implements the concept of a Context to represent a global registry in your application to manage config, state, dependencies, classes, etc. Context also serves as an IoC container used to inject dependencies into your code. | ||
@@ -17,3 +17,3 @@ ## Installation | ||
## Basic use | ||
``` | ||
```ts | ||
// app level | ||
@@ -26,6 +26,6 @@ const app = new Application(); // `app` is a "Context" | ||
Dependency injection using context | ||
``` | ||
```ts | ||
const Application = require('@loopback/core'); | ||
const app = new Application(); | ||
const app.bind('defaultName').to('John'); // setting context | ||
app.bind('defaultName').to('John'); // setting context | ||
@@ -32,0 +32,0 @@ class HelloController { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
658491
6361
100