New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bottlejs

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bottlejs - npm Package Compare versions

Comparing version 1.6.1 to 1.6.2

1

dist/bottle.d.ts

@@ -81,2 +81,3 @@ declare class Bottle {

service(name: string, Constructor: ((...any: any[]) => any), ...dependency: string[]): this;
service<T>(name: string, Constructor: new (...any: any[]) => T, ...dependency: string[]): this;

@@ -83,0 +84,0 @@ /**

32

dist/bottle.js
;(function(undefined) {
'use strict';
/**
* BottleJS v1.6.1 - 2017-05-17
* BottleJS v1.6.2 - 2017-11-27
* A powerful dependency injection micro container

@@ -51,3 +51,11 @@ *

var getNestedBottle = function getNestedBottle(name) {
return this.nested[name] || (this.nested[name] = Bottle.pop());
var bottle;
if (!this.nested[name]) {
bottle = Bottle.pop();
this.nested[name] = bottle;
this.factory(name, function SubProviderFactory() {
return bottle.container;
});
}
return this.nested[name];
};

@@ -318,3 +326,3 @@

if (parts.length) {
createSubProvider.call(this, name, Provider, parts);
getNestedBottle.call(this, name).provider(parts.join('.'), Provider);
return this;

@@ -385,20 +393,2 @@ }

/**
* Creates a bottle container on the current bottle container, and registers
* the provider under the sub container.
*
* @param String name
* @param Function Provider
* @param Array parts
* @return Bottle
*/
var createSubProvider = function createSubProvider(name, Provider, parts) {
var bottle;
bottle = getNestedBottle.call(this, name);
this.factory(name, function SubProviderFactory() {
return bottle.container;
});
return bottle.provider(parts.join('.'), Provider);
};
/**
* Register a service, factory, provider, or value based on properties on the object.

@@ -405,0 +395,0 @@ *

{
"name": "bottlejs",
"version": "1.6.1",
"version": "1.6.2",
"description": "A powerful dependency injection micro container",

@@ -5,0 +5,0 @@ "main": "dist/bottle.js",

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