{"maintainers":[{"name":"justmoon","email":"justmoon@members.fsf.org"},{"name":"ripple","email":"ops+npm@ripple.com"}],"keywords":["dependency","injection","loose-coupling","testing","productivity"],"dist-tags":{"latest":"1.6.2"},"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"description":"Minimalistic Dependency Injection (DI) for ES6","readme":"# Constitute [![npm][npm-image]][npm-url] [![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url]\n\n[npm-image]: https://img.shields.io/npm/v/constitute.svg?style=flat\n[npm-url]: https://npmjs.org/package/constitute\n[travis-image]: https://travis-ci.org/justmoon/constitute.svg\n[travis-url]: https://travis-ci.org/justmoon/constitute\n[codecov-image]: http://codecov.io/github/justmoon/constitute/coverage.svg?branch=master\n[codecov-url]: http://codecov.io/github/justmoon/constitute?branch=master\n\n> Minimalistic Dependency Injection (DI) for ES6\n\n## Why Dependency Injection?\n\nThere are lots of good resources out there on Dependency Injection (DI) and Inversion of Control (IoC). For JavaScript developers, [Vojta Jina's ng-conf presentation](https://www.youtube.com/watch?v=_OGGsf1ZXMs) is a fantastic primer.\n\nFor many smaller apps, using plain ol' Node.js modules works just fine. But eventually you want more control over when your components get instantiated. So you switch to classes and inject your dependencies via the constructor. But now you have annoying glue code like this to maintain:\n\n``` js\nfunction main () {\n  const electricity = new Electricity()\n  const grinder = new Grinder(electricity)\n  const heater = new Heater(electricity)\n  const pump = new Pump(heater, electricity)\n  const coffeeMaker = new CoffeeMaker(grinder, pump, heater)\n  coffeeMaker.brew()\n}\n```\n\nTools like `constitute` can turn that into:\n\n``` js\nfunction main () {\n  const coffeeMaker = constitute(CoffeeMaker)\n  coffeeMaker.brew()\n}\n```\n\nYour classes remain easily testable and life is good.\n\n## Why this library?\n\nAwesome Dependency Injection frameworks are on the way for JavaScript. Like the one in [Angular 2](http://blog.thoughtram.io/angular/2015/05/18/dependency-injection-in-angular-2.html). But I wanted a module which is independent from any framework and works in ES5/ES6/ES7 with or without transpiling.\n\n## Installation\n\n``` sh\nnpm install --save constitute\n```\n\n## Usage\n\nLet's look at an example. For this README I'm going to use ES6 modules syntax. If you need CommonJS (`require`) style, please look in `example/es6-cjs`.\n\nSuppose we have three classes `A`, `B` and `C`. `A` depends on `B` and `C`. There are no other dependencies. We need to tell `constitute` that `A` depends on `B` and `C`. We also call the dependencies \"constituents\".\n\n**a.js**\n``` js\nimport B from './b'\nimport C from './c'\n\nexport default class A {\n  static constitute () { return [ B, C ] }\n  constructor (b, c) {\n    this.b = b\n    this.c = c\n  }\n}\n```\n\nIf you are transpiling, you can also use an ES7-style decorator:\n\n**a.js** *(alternative with ES7 decorator)*\n```\nimport { Dependencies } from 'constitute'\n\n@Dependencies(B, C)\nexport default class A {\n  constructor (b, c) {\n    this.b = b\n    this.c = c\n  }\n}\n```\n\nThe classes `B` and `C` are defined without any special sugar:\n\n**b.js**\n``` js\nexport default class B {}\n```\n\n**c.js**\n``` js\nexport default class C {}\n```\n\nBecause these classes do not have any dependencies, we don't need to annotate them.\n\nSo how do we instantiate our annotated class `A`?\n\n**main.js**\n``` js\nimport constitute from '../../'\nimport A from './a'\n\n// Instantiate a class\n// Calling constitute() creates a new dependency injection context\nconst a = constitute(A)\n\nconsole.log(a.constructor.name) // => A\nconsole.log(a.b.constructor.name) // => B\nconsole.log(a.c.constructor.name) // => C\n\n// Simple.\n```\n\nAnd that's all you need to know to get started. The rest of the documentation below is there when you need it.\n\n### Resolvers\n\nWhen requesting dependencies, you can modify what kind of value is provided by using a *resolver*.\n\n```js\nimport { Lazy } from 'constitute'\n\nclass D {\n  static constitute () { return [ Lazy.of(A) ] }\n  constructor (getA) {\n    this.getA = getA\n  }\n}\n```\n\nThere are different types of resolvers:\n\n* `Instance` - The default resolver. Resolves the dependency immediately and provides it as the value\n* `Lazy` - Provides a function which resolves the dependency when called, returning the value\n* `All` - Provides an array of values for all dependencies bound to the provided key (see *Binding* below)\n* `Optional` - Injects a value only if the dependency already exists in the container; `undefined` otherwise\n\n### Constitutors\n\nYou can also change how your dependencies are instantiated. There are three built-in policies:\n\n* `Singleton` - The default. Your dependency is instantiated once per container.\n* `Global` - Like a singleton, except the same instance is used even across containers. **Warning: Use of globals is generally discouraged. According to [some](http://www.ibm.com/developerworks/webservices/library/co-single/index.html), globals are ok for very specific use cases, such as loggers.**\n* `Transient` - Your dependency is instantiated every time it is resolved.\n\nTo use a different constitutor, simply return it from the `constitute` method:\n\n```js\nimport { Transient } from 'constitute'\n\nclass E {\n  static constitute () { return Transient.with( [ A ] ) }\n  constructor (a) {\n    this.a = a\n  }\n}\n```\n\n### Binding\n\nBy default, classes resolve to a new instance of themselves. But what if we want to remap what they resolve to?\n\n#### Binding for tests\n\nLet's say we're testing and we to replace our `Database` service with a `MockDatabase` service. But first, here's our database service:\n\n(In the interest of brevity, we'll skip imports for this example.)\n\n**lib/database.js**\n```js\nclass Database {\n  static constitute () { return [ Config ] }\n  constructor (config) {\n    this.connection = config.get('db.uri')\n  }\n}\n```\n\nAnd our app itself:\n\n**lib/app.js**\n```js\nclass App {\n  static constitute () { return [ Database ] }\n  constructor (db) {\n    this.db = db\n  }\n}\n```\n\nHere are our tests where we instantiate the app using a mock database:\n\n**test/appSpec.js**\n```js\ndescribe('App', function () {\n  beforeEach(function () {\n    // Here is our mock database class\n    class MockDatabase { ... }\n\n    // First, let's get a fresh container\n    this.container = new constitute.Container()\n\n    // Then we tell it to bind the database to the mock database\n    this.container.bind(Database, MockDatabase)\n\n    // Finally we can instantiate the app\n    this.app = this.container.constitute(App)\n\n    // Simple.\n  })\n\n  // ...\n})\n```\n\nThe main difference you'll notice is that this time we used `new constitute.Container` and `Container#constitute()` instead of the short-hand `constitute()`. We also introduced the `Container#bind()` method, which takes a key as its first argument and a class or factory as its second argument.\n\n\n### Factories\n\nSo far, we've only dealt with class dependencies. But classes (more specifically, class constructors) are actually just one type of factory in `constitute`.\n\n* `Class(constructor, constitutor)` - This is the default factory. If you try to instantiate a non-factory value, `constitute` will try to wrap it in a `Class` factory. What this factory does is to try to gather the dependency and constitutor settings from a static method called `constitute`. The constitutor will resolve the dependencies and finally, the `Class` factory will call the constructor with the new keyword and the resolved dependencies as arguments.\n* `Alias(key, constitutor)` - Links to another key on the same container. You can use `Alias` to specify another key and when it is asked to instantiate a value it will call that other factory instead.\n* `Value(value)` - Doesn't instantiate anything, it simply returns the same value every time.\n* `Clone(value, constitutor)` - Creates a clone of the provided value.\n* `Method(fn, constitutor)` - Allows you to specify a custom factory function.\n\n#### `Class` factory\n\nNormally, you never need to worry about the `Class` factory. Any classes you pass to `constitute` will automatically be wrapped in `Class` factories.\n\nHowever, manually creating a Class factory allows you to pass in a constitutor. That can be useful, if you don't want to add a `constitute` method on the class itself.\n\nIn other words, this:\n\n``` js\nclass A {\n  static constitute () { return [ B ] }\n  constructor (b) { ... }\n}\n\nconst a = constitute(A)\n```\n\nIs the same as this:\n\n``` js\nimport constitute, { Class } from 'constitute'\n\nclass ActualA {\n  constructor (b) { ... }\n}\nconst A = new Class(ActualA, [ B ])\n\nconst a = constitute(A)\n```\n\nJust make sure when you specify your dependencies to reference this Class as `A`, not as `ActualA`. Although you could of course bind `ActualA` to `A`:\n\n``` js\nmyContainer.bindClass(ActualA, A)\n```\n\nAfter that, both `A` and `ActualA` would resolve to your `Class` factory with the correct dependencies.\n\nTo add metadata to existing classes, you can also use the `container.bindClass` convenience wrapper:\n\n``` js\nimport { Container } from 'constitute'\n\nclass A {\n  constructor (b) { ... }\n}\n\nconst container = new Container()\n// Bind the key A to a ClassFactory for A with a Singleton constitutor and a single dependency, B\ncontainer.bindClass(A, A, [ B ])\n\nconst a = container.constitute(A)\n```\n\n#### `Alias` factory\n\nThe `Alias` factory can be used to cause a lookup for another key in the current container and use that key's factory instead. By default, `Alias` factories will use the `Transient` constitutor, meaning the alias mapping will be resolved every time the aliased key is requested. The alias target uses its own constitutor as normal, so the target may still be a cached instance.\n\n``` js\nclass A {}\nclass B extends A {}\n\nconst container = new Container()\ncontainer.bindAlias(A, B)\nconst instance = container.constitute(A)\n\nconsole.log(instance instanceof B) // => true\n\n// Note that the alias respects any later bindings of the target Key\ncontainer.bindValue(B, 65537)\nconsole.log(container.constitute(A)) // => 65537\n```\n\n#### `Value` factory\n\nPossibly the most boring constructor. It always returns the same value. Because the value is static anyway it also doesn't need a constitutor. But you *can* still rebind it, alias it and so on.\n\n``` js\nimport constitute, { Value, Container } from 'constitute'\n\nconst V = new Value(42)\n\nclass A {\n  static constitute () { return [ V ] }\n  constructor (v) {\n    console.log('The answer is ' + v)\n  }\n}\n\nclass B extends A {}\n\nconstitute(A) // => The answer is 42\n\n// Like all factories, Value factories support binding, so we can override the value later\nconst container = new Container()\ncontainer.bindValue(V, undefined)\ncontainer.constitute(B) // => The answer is undefined\n```\n\n#### `Clone` factory\n\nSimilar to the `Value` factory, but returns a clone of the value (for objects and arrays) instead of the value itself. Defaults to the `Transient` constitutor.\n\n``` js\nimport constitute, { Clone, Container } from 'constitute'\n\nconst V = new Clone({ foo: 'bar' })\n\nclass A {\n  static constitute () { return [ V ] }\n  constructor (v) {\n    this.v = v\n  }\n}\n\nclass B extends A {}\n\nconst a = constitute(A)\nconst b = constitute(B)\n\na.v.foo = 'baz'\n\nconsole.log(a.v.foo) // => 'baz'\nconsole.log(b.v.foo) // => 'bar'\n```\n\n#### `Method` factory\n\nWith `Method`, you can define your own factory function. Wield this power wisely.\n\nYour factory function is called with the dependencies as the parameters and the container as `this`.\n\n``` js\nimport { Method } from 'constitute'\n\nclass C { }\n\nconst B = new Method(function (c) {\n  return { c }\n}, [ C ])\n\nexport default class A {\n  static constitute () { return [ B ] }\n  constructor (b) {\n    this.b = b\n  }\n}\n\nconsole.log(constitute(A).b.c instanceof C) // => true\n```\n\n### Containers\n\nAll instances (except for dependencies using the `Global` constitutor) are isolated within `Container`s. To get the container your instance lives in, just request `Container` as a dependency:\n\n``` js\nimport { Container } from 'constitute'\n\nclass A {\n  static constitute () { return [ Container ] }\n  constructor (container) {\n    // container is the current container context\n  }\n}\n```\n\n#### Container hierarchy\n\nYou can create subcontainers to override dependencies locally without affecting upstream bindings.\n\n``` js\nimport { Container } from 'constitute'\n\nconst masterContainer = new Container()\nconst subContainer = masterContainer.createChild()\n\nclass A {}\nclass B {}\n\nsubContainer.bindClass(A, B)\n\nconsole.log(subContainer.constitute(A) instanceof B) // => true\nconsole.log(masterContainer.constitute(A) instanceof A) // => true\n```\n\nSubcontainers also use an inheritance-aware cache. If a class has already been instantiated on the parent (and it is using a per-container caching constitutor, such as Singleton) it will be returned from cache.\n\n``` js\nimport { Container } from 'constitute'\n\nclass A {}\n\nconst masterContainer = new Container()\nconst subContainer = masterContainer.createChild()\n\nconst a1 = masterContainer.constitute(A)\nconst a2 = subContainer.constitute(A)\n\nconsole.log(a1 === a2) // => true\n```\n\nIf a class has already been instantiated in the subcontainer, the subcontainer will continue to use that cached instance even if the parent container later creates an instance of its own.\n\n### Post-constructors\n\nSuppose you have two classes that depend on each other—a circular dependency. Constitute has to instantiate A before B and B before A which is impossible. You can resolve the situation using a post-constructor:\n\n``` js\nclass A {\n  static constitute () { return [ Container ] }\n  constructor (container) {\n    // Assigning b in a post-constructor allows both objects to be constructed\n    // first, resolving the cyclic dependency.\n    //\n    // Note that the post-constructor still runs synchronously, before this\n    // object is returned to any third-party consumers.\n    container.schedulePostConstructor(function (b) {\n      this.b = b\n    }, [ B ])\n  }\n}\n\nclass B {\n  static constitute () { return [ A ] }\n  constructor (a) {\n    this.a = a\n  }\n}\n```\n\nWhen keeping your classes in separate files, you need to also watch out for circular `require`s.\n\nAn easy solution is to put your `require` directly before `schedulePostConstructor`:\n\n**a.js**\n``` js\nclass A {\n  static constitute () { return [ Container ] }\n  constructor (container) {\n    const B = require('./b')\n    container.schedulePostConstructor(function (b) {\n      this.b = b\n    }, [ B ])\n  }\n}\n```\n\n**b.js**\n``` js\nconst A = require('./a')\nclass B {\n  static constitute () { return [ A ] }\n  constructor (a) {\n    this.a = a\n  }\n}\n```\n\n\n## Acknowledgements\n\nThis library borrows heavily from the fantastic [DI component](https://github.com/aurelia/dependency-injection) in the [Aurelia framework](http://aurelia.io/). Awesome stuff.\n\nFurther inspiration comes from the [DI features](http://blog.thoughtram.io/angular/2015/05/18/dependency-injection-in-angular-2.html) in [Angular 2](https://angularjs.org/).\n","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"users":{"fwestrom":true},"bugs":{"url":"https://github.com/justmoon/constitute/issues"},"license":"ISC","versions":{"1.0.0":{"name":"constitute","version":"1.0.0","description":"Minimalistic Dependency Injection (DI) for ES6","main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint ."},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"chai":"^3.2.0","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5"},"gitHead":"0a3a35d355c03c4bb33353e92377c1d5f1256d9a","_id":"constitute@1.0.0","_shasum":"4c5f6dfd926a211fb2233a141d297dcfc873f6dd","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"ripple","email":"ops+npm@ripple.com"},"dist":{"shasum":"4c5f6dfd926a211fb2233a141d297dcfc873f6dd","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.0.0.tgz"},"maintainers":[{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.1.0":{"name":"constitute","version":"1.1.0","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint ."},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"chai":"^3.2.0","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5"},"gitHead":"7dd0e88151bd2bce94c682b0932284550588aca9","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute","_id":"constitute@1.1.0","_shasum":"7abffcb0cbfdcc882cd90476deee2b9e5d66f36e","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"ripple","email":"ops+npm@ripple.com"},"dist":{"shasum":"7abffcb0cbfdcc882cd90476deee2b9e5d66f36e","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.1.0.tgz"},"maintainers":[{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.2.0":{"name":"constitute","version":"1.2.0","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint ."},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"chai":"^3.2.0","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5"},"dependencies":{"clone":"^1.0.2"},"gitHead":"5b7e13de619947b30642299bcfd63120fb8440d9","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute","_id":"constitute@1.2.0","_shasum":"9b9bdd158741b21e9393d0c916f80ee1e4e438d7","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"ripple","email":"ops+npm@ripple.com"},"dist":{"shasum":"9b9bdd158741b21e9393d0c916f80ee1e4e438d7","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.2.0.tgz"},"maintainers":[{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.3.0":{"name":"constitute","version":"1.3.0","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint .","codecov":"cat coverage/lcov.info | codecov"},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"chai":"^3.2.0","codecov.io":"^0.1.6","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5"},"dependencies":{"clone":"^1.0.2"},"gitHead":"99c536bd44834cf23c8da28c8d76eee1c97bf0ab","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute","_id":"constitute@1.3.0","_shasum":"cacc6ecfc3bd136c5f3e5c79922329a506aa452d","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.2.0","_npmUser":{"name":"justmoon","email":"justmoon@members.fsf.org"},"dist":{"shasum":"cacc6ecfc3bd136c5f3e5c79922329a506aa452d","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.3.0.tgz"},"maintainers":[{"name":"justmoon","email":"justmoon@members.fsf.org"},{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.4.0":{"name":"constitute","version":"1.4.0","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"git+https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint --ext .js --ext es7 .","codecov":"cat coverage/lcov.info | codecov"},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.1","chai":"^3.2.0","codecov.io":"^0.1.6","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5"},"dependencies":{"clone":"^1.0.2"},"gitHead":"6a80c04e0b0c988367623637256195350232f8fc","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute#readme","_id":"constitute@1.4.0","_shasum":"c7227b5685f51750c8abcf9b9754c1dfb85b125a","_from":".","_npmVersion":"2.14.2","_nodeVersion":"3.2.0","_npmUser":{"name":"justmoon","email":"justmoon@members.fsf.org"},"dist":{"shasum":"c7227b5685f51750c8abcf9b9754c1dfb85b125a","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.4.0.tgz"},"maintainers":[{"name":"justmoon","email":"justmoon@members.fsf.org"},{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.5.0":{"name":"constitute","version":"1.5.0","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint --ext .js --ext es7 .","codecov":"cat coverage/lcov.info | codecov"},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.1","chai":"^3.2.0","codecov.io":"^0.1.6","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5"},"dependencies":{"clone":"^1.0.2"},"gitHead":"d3d3e64a0aeed4394b3b5547d9875fa777b1d311","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute","_id":"constitute@1.5.0","_shasum":"cd563940cf581b17c588834cdb50e486ff839583","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"justmoon","email":"justmoon@members.fsf.org"},"dist":{"shasum":"cd563940cf581b17c588834cdb50e486ff839583","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.5.0.tgz"},"maintainers":[{"name":"justmoon","email":"justmoon@members.fsf.org"},{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.6.0":{"name":"constitute","version":"1.6.0","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint --ext .js --ext es7 .","codecov":"cat coverage/lcov.info | codecov"},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.1","chai":"^3.2.0","codecov.io":"^0.1.6","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5","sinon":"^1.17.0","sinon-chai":"^2.8.0"},"dependencies":{"clone":"^1.0.2"},"gitHead":"b97c01066ed182949b22ef2e605fe37fa8f041f6","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute","_id":"constitute@1.6.0","_shasum":"d5418baf8deb0b530687252d9dc2bb1ee030440a","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"justmoon","email":"justmoon@members.fsf.org"},"dist":{"shasum":"d5418baf8deb0b530687252d9dc2bb1ee030440a","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.6.0.tgz"},"maintainers":[{"name":"justmoon","email":"justmoon@members.fsf.org"},{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.6.1":{"name":"constitute","version":"1.6.1","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint --ext .js --ext es7 .","codecov":"cat coverage/lcov.info | codecov"},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.1","chai":"^3.2.0","codecov.io":"^0.1.6","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5","sinon":"^1.17.0","sinon-chai":"^2.8.0"},"dependencies":{"clone":"^1.0.2"},"gitHead":"b058b6d635146d0dfbfc3d2b0221c2d1baeb48ee","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute","_id":"constitute@1.6.1","_shasum":"68c259843cf2c2f2d9af9c3e06cea4a37382fed4","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"justmoon","email":"justmoon@members.fsf.org"},"dist":{"shasum":"68c259843cf2c2f2d9af9c3e06cea4a37382fed4","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.6.1.tgz"},"maintainers":[{"name":"justmoon","email":"justmoon@members.fsf.org"},{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}},"1.6.2":{"name":"constitute","version":"1.6.2","description":"Minimalistic Dependency Injection (DI) for ES6","repository":{"type":"git","url":"https://github.com/justmoon/constitute.git"},"main":"index.js","scripts":{"test":"node node_modules/.bin/istanbul test -- _mocha","lint":"eslint --ext .js --ext es7 .","codecov":"cat coverage/lcov.info | codecov"},"keywords":["dependency","injection","loose-coupling","testing","productivity"],"author":{"name":"Stefan Thomas","email":"justmoon@members.fsf.org"},"license":"ISC","devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.1","chai":"^3.2.0","codecov.io":"^0.1.6","eslint":"^1.2.1","eslint-config-standard":"^4.1.0","eslint-plugin-standard":"^1.2.0","istanbul-harmony":"^0.3.16","mocha":"^2.2.5","sinon":"^1.17.0","sinon-chai":"^2.8.0"},"dependencies":{"clone":"^1.0.2"},"gitHead":"ed5ef1af13eb4f215cf8d0da12848a87542662cd","bugs":{"url":"https://github.com/justmoon/constitute/issues"},"homepage":"https://github.com/justmoon/constitute","_id":"constitute@1.6.2","_shasum":"ba9f2b33f1510ac4d1ac3ddc8d4ae7ce5a28aa32","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"justmoon","email":"justmoon@members.fsf.org"},"dist":{"shasum":"ba9f2b33f1510ac4d1ac3ddc8d4ae7ce5a28aa32","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/constitute/-/constitute-1.6.2.tgz"},"maintainers":[{"name":"justmoon","email":"justmoon@members.fsf.org"},{"name":"ripple","email":"ops+npm@ripple.com"}],"directories":{}}},"name":"constitute","time":{"modified":"2017-04-16T18:07:39.792Z","created":"2015-08-24T02:41:21.799Z","1.0.0":"2015-08-24T02:41:21.799Z","1.1.0":"2015-08-26T06:22:13.500Z","1.2.0":"2015-08-30T09:47:22.767Z","1.3.0":"2015-09-06T16:41:35.267Z","1.4.0":"2015-09-08T21:23:53.548Z","1.5.0":"2015-09-12T03:23:04.542Z","1.6.0":"2015-09-25T04:06:54.922Z","1.6.1":"2015-09-26T06:02:33.802Z","1.6.2":"2015-09-26T06:44:09.798Z"},"readmeFilename":"README.md","homepage":"https://github.com/justmoon/constitute"}