Socket
Socket
Sign inDemoInstall

blister

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.12.0 to 0.13.0

6

dist/blister.js

@@ -171,3 +171,7 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Blister = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

register: function(provider) {
provider.register(this);
if (typeof provider === 'function') {
provider(this);
} else {
provider.register(this);
}
return this;

@@ -174,0 +178,0 @@ },

2

dist/blister.min.js

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Blister=e()}}(function(){return function e(t,n,r){function o(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){var n=t[s][1][e];return o(n?n:e)},d,d.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t){"use strict";function n(e){if("string"!=typeof e)throw new TypeError("The dependency id must be a string: "+e)}function r(){this._deps=Object.create(null)}var o=e("./wrappers"),i=e("./errors"),s=i.IllegalExtensionError,u=i.UnregisteredDependencyError,c=i.UnregisteredExtendedDependencyError,f="value",d="singleton",p="factory";r.IllegalExtensionError=s,r.UnregisteredDependencyError=u,r.UnregisteredExtendedDependencyError=c,r.prototype={constructor:r,has:function(e){return n(e),e in this._deps},get:function(e){if(n(e),!this.has(e))throw new u("Cannot get unregistered dependency "+e);return this._deps[e].call(this)},value:function(e,t){return this._set(e,t,f,!1)},factory:function(e,t){return this._set(e,t,p,!1)},service:function(e,t){return this._set(e,t,d,!1)},extend:function(e,t){return this._set(e,t,void 0,!0)},_set:function(e,t,r,i){n(e);var s=i?this._deps[e]:void 0;if(i){if(!s)throw new c;r=s.type,r===f&&(r=d)}if("function"!=typeof t&&(i||r!==f))throw new TypeError("The argument must be a function: "+t);return this._deps[e]=o.create(r,t,this,s),this},register:function(e){return e.register(this),this},createContext:function(){var e=Object.create(r.prototype);return e._deps=Object.create(this._deps),e}},t.exports=r},{"./errors":2,"./wrappers":3}],2:[function(e,t){"use strict";function n(){}function r(e){this.name="IllegalExtensionError",this.message=e||"Values cannot be extended. Redefine them instead"}function o(e){this.name="UnregisteredDependencyError",this.message=e||"Cannot get an unregistered dependency"}function i(e){this.name="UnregisteredExtendedDependencyError",this.message=e||"Cannot extend a dependency not previously set"}n.prototype=Error.prototype,r.prototype=new n,r.constructor=r,o.prototype=new n,o.constructor=o,i.prototype=new n,i.constructor=i,t.exports={IllegalExtensionError:r,UnregisteredDependencyError:o,UnregisteredExtendedDependencyError:i}},{}],3:[function(e,t){"use strict";var n={value:function(e){return function(){return e}},factory:function(e,t,n){return function(){return n?e.call(this,n(),this):e.call(this,this)}},singleton:function(e,t,n){var r,o=!1;return function(){return o||(r=n?e.call(t,n(),t):e.call(t,t),o=!0,e=null),r}},create:function(e,t,n,r){var o=this[e](t,n,r);return o.type=e,o}};t.exports=n},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Blister=e()}}(function(){return function e(t,n,r){function o(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){var n=t[s][1][e];return o(n?n:e)},d,d.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t){"use strict";function n(e){if("string"!=typeof e)throw new TypeError("The dependency id must be a string: "+e)}function r(){this._deps=Object.create(null)}var o=e("./wrappers"),i=e("./errors"),s=i.IllegalExtensionError,u=i.UnregisteredDependencyError,c=i.UnregisteredExtendedDependencyError,f="value",d="singleton",p="factory";r.IllegalExtensionError=s,r.UnregisteredDependencyError=u,r.UnregisteredExtendedDependencyError=c,r.prototype={constructor:r,has:function(e){return n(e),e in this._deps},get:function(e){if(n(e),!this.has(e))throw new u("Cannot get unregistered dependency "+e);return this._deps[e].call(this)},value:function(e,t){return this._set(e,t,f,!1)},factory:function(e,t){return this._set(e,t,p,!1)},service:function(e,t){return this._set(e,t,d,!1)},extend:function(e,t){return this._set(e,t,void 0,!0)},_set:function(e,t,r,i){n(e);var s=i?this._deps[e]:void 0;if(i){if(!s)throw new c;r=s.type,r===f&&(r=d)}if("function"!=typeof t&&(i||r!==f))throw new TypeError("The argument must be a function: "+t);return this._deps[e]=o.create(r,t,this,s),this},register:function(e){return"function"==typeof e?e(this):e.register(this),this},createContext:function(){var e=Object.create(r.prototype);return e._deps=Object.create(this._deps),e}},t.exports=r},{"./errors":2,"./wrappers":3}],2:[function(e,t){"use strict";function n(){}function r(e){this.name="IllegalExtensionError",this.message=e||"Values cannot be extended. Redefine them instead"}function o(e){this.name="UnregisteredDependencyError",this.message=e||"Cannot get an unregistered dependency"}function i(e){this.name="UnregisteredExtendedDependencyError",this.message=e||"Cannot extend a dependency not previously set"}n.prototype=Error.prototype,r.prototype=new n,r.constructor=r,o.prototype=new n,o.constructor=o,i.prototype=new n,i.constructor=i,t.exports={IllegalExtensionError:r,UnregisteredDependencyError:o,UnregisteredExtendedDependencyError:i}},{}],3:[function(e,t){"use strict";var n={value:function(e){return function(){return e}},factory:function(e,t,n){return function(){return n?e.call(this,n(),this):e.call(this,this)}},singleton:function(e,t,n){var r,o=!1;return function(){return o||(r=n?e.call(t,n(),t):e.call(t,t),o=!0,e=null),r}},create:function(e,t,n,r){var o=this[e](t,n,r);return o.type=e,o}};t.exports=n},{}]},{},[1])(1)});
//# sourceMappingURL=blister.min.js.map
{
"name": "blister",
"version": "0.12.0",
"version": "0.13.0",
"author": "Rubén Norte <rubennorte@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Minimalist dependency injection container for JavaScript",

@@ -122,7 +122,19 @@ # Blister

Service providers can be used to help organizing the registration of dependencies. A service provider is any object implementing a `register` method.
Service providers can be used to help organizing the registration of dependencies. A service provider can be both a function or anything implementing a `register` method.
Example:
Example with a function:
```javascript
function provider(container) {
container.value('protocol', 'http://');
container.value('host', 'example.com');
}
var container = new Blister();
container.register(provider);
```
Example with object:
```javascript
var provider = {

@@ -129,0 +141,0 @@ register: function(container) {

@@ -170,3 +170,7 @@ 'use strict';

register: function(provider) {
provider.register(this);
if (typeof provider === 'function') {
provider(this);
} else {
provider.register(this);
}
return this;

@@ -173,0 +177,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc