Skip to content

Commit

Permalink
Merge pull request #60 from young-steveo/release-1.4.0
Browse files Browse the repository at this point in the history
Release 1.4.0
  • Loading branch information
young-steveo authored Aug 3, 2016
2 parents cc59696 + c8cba57 commit 190ca59
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

![BottleJS](/bottle-logo.jpg)
# BottleJS [![Build Status](https://travis-ci.org/young-steveo/bottlejs.svg?branch=master)](https://travis-ci.org/young-steveo/bottlejs)
# BottleJS

[![Build Status](https://travis-ci.org/young-steveo/bottlejs.svg?branch=master)](https://travis-ci.org/young-steveo/bottlejs)
[![npm version](https://badge.fury.io/js/bottlejs.svg)](https://badge.fury.io/js/bottlejs)
[![dependencies Status](https://david-dm.org/young-steveo/bottlejs/status.svg)](https://david-dm.org/young-steveo/bottlejs)
[![Known Vulnerabilities](https://snyk.io/test/github/young-steveo/bottlejs/badge.svg)](https://snyk.io/test/github/young-steveo/bottlejs)

[![NPM](https://nodei.co/npm/bottlejs.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bottlejs/)
[![NPM](https://nodei.co/npm-dl/bottlejs.png?months=9&height=3)](https://nodei.co/npm/bottlejs/)

> A powerful dependency injection micro container
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bottlejs",
"version": "1.3.0",
"version": "1.4.0",
"description": "A powerful dependency injection micro container",
"main": "dist/bottle.min.js",
"license": "MIT",
Expand Down Expand Up @@ -38,4 +38,4 @@
"private": false,
"dependencies": {},
"devDependencies": {}
}
}
19 changes: 18 additions & 1 deletion dist/bottle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;(function(undefined) {
'use strict';
/**
* BottleJS v1.3.0 - 2016-04-29
* BottleJS v1.4.0 - 2016-08-03
* A powerful dependency injection micro container
*
* Copyright (c) 2016 Stephen Young
Expand Down Expand Up @@ -213,6 +213,22 @@
});
};

/**
* Register an instance factory inside a generic factory.
*
* @param {String} name - The name of the service
* @param {Function} Factory - The factory function, matches the signature required for the
* `factory` method
* @return Bottle
*/
var instanceFactory = function instanceFactory(name, Factory) {
return factory.call(this, name, function GenericInstanceFactory(container) {
return {
instance : Factory.bind(Factory, container)
};
});
};

/**
* A filter function for removing bottle container methods and providers from a list of keys
*/
Expand Down Expand Up @@ -569,6 +585,7 @@
defer : defer,
digest : digest,
factory : factory,
instanceFactory: instanceFactory,
list : list,
middleware : middleware,
provider : provider,
Expand Down
4 changes: 2 additions & 2 deletions dist/bottle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 190ca59

Please sign in to comment.