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

inversify-binding-decorators

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

inversify-binding-decorators - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

dts/decorator/fluent_provide.d.ts

7

es/decorator/fluent_provide.js

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import ProvideInWhenOnSyntax from "../syntax/provide_in_when_on_syntax";

@@ -13,2 +7,3 @@ import ProvideWhenSyntax from "../syntax/provide_when_syntax";

function fluentProvide(kernel) {
// function is named for testing
return function _fluentProvide(serviceIdentifier) {

@@ -15,0 +10,0 @@ var bindingWhenOnSyntax = kernel.bind(serviceIdentifier).to(null);

@@ -1,9 +0,4 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import { decorate, injectable } from "inversify";
function provide(kernel) {
// function is named for testing
return function _provide(serviceIdentifier) {

@@ -10,0 +5,0 @@ var bindingWhenOnSyntax = kernel.bind(serviceIdentifier).to(null);

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

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import fluentProvide from "../decorator/fluent_provide";
function makeFluentProvideDecorator(kernel) {
return fluentProvide(kernel);
var result = null;
result = fluentProvide(kernel);
return result;
}
export default makeFluentProvideDecorator;

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import provide from "../decorator/provide";

@@ -8,0 +2,0 @@ function makeProvideDecorator(kernel) {

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import makeProvideDecorator from "./factory/provide_decorator_factory";

@@ -8,0 +2,0 @@ import makeFluentProvideDecorator from "./factory/fluent_provide_decorator_factory";

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import { decorate, injectable } from "inversify";

@@ -8,0 +2,0 @@ var ProvideDoneSyntax = (function () {

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import ProvideWhenOnSyntax from "./provide_when_on_syntax";

@@ -22,2 +16,8 @@ import ProvideWhenSyntax from "./provide_when_syntax";

};
ProvideInSyntax.prototype.inTransientScope = function () {
var bindingWhenOnSyntax = this._bindingInSyntax.inTransientScope();
var provideWhenSyntax = new ProvideWhenSyntax(bindingWhenOnSyntax, this._provideDoneSyntax);
var provideOnSyntax = new ProvideOnSyntax(bindingWhenOnSyntax, this._provideDoneSyntax);
return new ProvideWhenOnSyntax(provideWhenSyntax, provideOnSyntax);
};
ProvideInSyntax.prototype.done = function () {

@@ -24,0 +24,0 @@ var binding = this._bindingInSyntax._binding;

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
var ProvideInWhenOnSyntax = (function () {

@@ -61,2 +55,5 @@ function ProvideInWhenOnSyntax(provideInSyntax, provideWhenSyntax, provideOnSyntax) {

};
ProvideInWhenOnSyntax.prototype.inTransientScope = function () {
return this._provideInSyntax.inTransientScope();
};
ProvideInWhenOnSyntax.prototype.done = function () {

@@ -63,0 +60,0 @@ return this._provideInSyntax.done();

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import ProvideWhenSyntax from "./provide_when_syntax";

@@ -8,0 +2,0 @@ var ProvideOnSyntax = (function () {

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
var ProvideWhenOnSyntax = (function () {

@@ -8,0 +2,0 @@ function ProvideWhenOnSyntax(provideWhenSyntax, provideOnSyntax) {

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import ProvideOnSyntax from "./provide_on_syntax";

@@ -8,0 +2,0 @@ var ProvideWhenSyntax = (function () {

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
import { decorate } from "inversify";

@@ -8,0 +2,0 @@ import makeProvideDecorator from "../factory/provide_decorator_factory";

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -14,2 +8,3 @@ var provide_in_when_on_syntax_1 = require("../syntax/provide_in_when_on_syntax");

function fluentProvide(kernel) {
// function is named for testing
return function _fluentProvide(serviceIdentifier) {

@@ -16,0 +11,0 @@ var bindingWhenOnSyntax = kernel.bind(serviceIdentifier).to(null);

@@ -1,10 +0,5 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";
var inversify_1 = require("inversify");
function provide(kernel) {
// function is named for testing
return function _provide(serviceIdentifier) {

@@ -11,0 +6,0 @@ var bindingWhenOnSyntax = kernel.bind(serviceIdentifier).to(null);

@@ -1,13 +0,9 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";
var fluent_provide_1 = require("../decorator/fluent_provide");
function makeFluentProvideDecorator(kernel) {
return fluent_provide_1.default(kernel);
var result = null;
result = fluent_provide_1.default(kernel);
return result;
}
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = makeFluentProvideDecorator;

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -8,0 +2,0 @@ var provide_1 = require("../decorator/provide");

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -8,0 +2,0 @@ var provide_decorator_factory_1 = require("./factory/provide_decorator_factory");

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -8,0 +2,0 @@ var inversify_1 = require("inversify");

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -23,2 +17,8 @@ var provide_when_on_syntax_1 = require("./provide_when_on_syntax");

};
ProvideInSyntax.prototype.inTransientScope = function () {
var bindingWhenOnSyntax = this._bindingInSyntax.inTransientScope();
var provideWhenSyntax = new provide_when_syntax_1.default(bindingWhenOnSyntax, this._provideDoneSyntax);
var provideOnSyntax = new provide_on_syntax_1.default(bindingWhenOnSyntax, this._provideDoneSyntax);
return new provide_when_on_syntax_1.default(provideWhenSyntax, provideOnSyntax);
};
ProvideInSyntax.prototype.done = function () {

@@ -25,0 +25,0 @@ var binding = this._bindingInSyntax._binding;

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -62,2 +56,5 @@ var ProvideInWhenOnSyntax = (function () {

};
ProvideInWhenOnSyntax.prototype.inTransientScope = function () {
return this._provideInSyntax.inTransientScope();
};
ProvideInWhenOnSyntax.prototype.done = function () {

@@ -64,0 +61,0 @@ return this._provideInSyntax.done();

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -8,0 +2,0 @@ var provide_when_syntax_1 = require("./provide_when_syntax");

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -8,0 +2,0 @@ var ProvideWhenOnSyntax = (function () {

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -8,0 +2,0 @@ var provide_on_syntax_1 = require("./provide_on_syntax");

@@ -1,7 +0,1 @@

/**
* inversify-binding-decorators v.1.0.0 - An utility that allows developers to declare InversifyJS bindings using ES2016 decorators
* Copyright (c) 2015 Remo H. Jansen <remo.jansen@wolksoftware.com> (http://www.remojansen.com)
* MIT inversify.io/LICENSE
* https://github.com/inversify/inversify-binding-decorators#readme
*/
"use strict";

@@ -8,0 +2,0 @@ var inversify_1 = require("inversify");

{
"name": "inversify-binding-decorators",
"version": "1.0.0",
"version": "2.0.0",
"description": "An utility that allows developers to declare InversifyJS bindings using ES2016 decorators",
"main": "lib/index.js",
"jsnext:main": "es/index.js",
"typings": "./dts/index.d.ts",
"scripts": {

@@ -27,26 +28,20 @@ "test": "gulp",

"devDependencies": {
"inversify": "^2.0.0-rc.12",
"inversify-dts": "^2.2.0",
"browserify": "^13.0.1",
"@types/chai": "^3.4.32",
"@types/mocha": "^2.2.31",
"@types/sinon": "^1.16.29",
"chai": "^3.5.0",
"gulp": "^3.9.1",
"gulp-header": "1.8.8",
"gulp-istanbul": "^1.0.0",
"gulp-mocha": "^3.0.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-tslint": "^6.0.2",
"gulp-typescript": "^2.13.4",
"gulp-uglify": "^2.0.0",
"harmonize": "^1.4.4",
"inversify": "^2.0.0",
"mocha": "^3.0.0",
"publish-please": "^2.1.4",
"mocha": "^3.0.0",
"reflect-metadata": "^0.1.3",
"run-sequence": "^1.2.0",
"sinon": "^1.17.4",
"tsify": "^1.0.2",
"tslint": "^3.12.0",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
"typescript": "^2.0.2"
}
}

@@ -23,13 +23,8 @@ # inversify-binding-decorators

```
$ npm install --save inversify inversify-binding-decorators reflect-metadata
$ npm install --save-dev inversify-dts
$ npm install inversify inversify-binding-decorators reflect-metadata --save
```
If you are workiong with TypeScript you will need the following `.d.ts` files:
The `inversify-binding-decorators` type definitions are included in the npm module and require TypeScript 2.0.
Please refer to the [InversifyJS documentation](https://github.com/inversify/InversifyJS#installation) to learn more about the installation process.
```
/// <reference path="node_modules/reflect-metadata/reflect-metadata.d.ts" />
/// <reference path="node_modules/inversify-dts/inversify-binding-decorators/inversify-binding-decorators.d.ts" />
```
### The basics

@@ -88,5 +83,2 @@ The [InversifyJS](http://inversify.io/) API allows us to delcare bindings using a fluent API:

A basic example can be found at the
[inversify-code-samples](https://github.com/inversify/inversify-code-samples/tree/master/inversify-binding-decorators) repository.
### Using classes, string literals & symbols as identifiers

@@ -93,0 +85,0 @@ When you invoke `@provide` using classes:

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