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

fount

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fount - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

3

package.json
{
"name": "fount",
"version": "0.0.4",
"version": "0.0.5",
"description": "A source from which dependencies flow",

@@ -26,2 +26,3 @@ "main": "./src/index.js",

"dependencies": {
"debug": "^1.0.4",
"lodash": "^2.4.1",

@@ -28,0 +29,0 @@ "when": "^3.3.1"

@@ -27,3 +27,3 @@ var should = require( 'should' );

var result;
fount.register( 'simpleFn', function() { return 'hello, world!' } );
fount.register( 'simpleFn', function() { return 'hello, world!'; } );

@@ -36,3 +36,3 @@ before( function( done ) {

} );
} )
} );

@@ -44,2 +44,19 @@ it( 'should resolve the function\'s result', function() {

describe( 'with dependency on a list', function() {
var result;
fount.register( 'simpleList', [ 1, 2, 3 ] );
before( function( done ) {
fount.resolve( 'simpleList' )
.then( function( list ) {
result = list;
done();
} );
} );
it( 'should resolve to the list', function() {
result.should.eql( [ 1, 2, 3 ] );
} );
} );
var a = { one: 1 };

@@ -339,3 +356,3 @@

} );
} )
} );

@@ -342,0 +359,0 @@ describe( 'when using custom containers', function() {

@@ -5,2 +5,3 @@ var _ = require( 'lodash' );

var whenKeys = require( 'when/keys' );
var debug = require( 'debug' )( 'fount' );

@@ -47,3 +48,3 @@ var containers = {};

function purgeAll() {
containers = { scopes: {} }
containers = { scopes: {} };
}

@@ -68,6 +69,9 @@

}
if( _.isFunction( fn ) ) {
dependencies = checkDependencies( fn, dependencies );
} else {
fn = fn || dependencies;
}
debug( 'Registering key "%s" for container "%s" with %s lifecycle: %s', key, containerName, lifecycle, dependencies, fn );
var promise = wrappers[ lifecycle ]( containerName, key, fn, dependencies );

@@ -129,3 +133,3 @@ container( containerName )[ key ] = promise;

}
}
};
},

@@ -138,3 +142,3 @@ scoped: function ( containerName, key, value, dependencies ) {

return resolvedTo;
}
};
if( cache[ key ] ) {

@@ -158,3 +162,3 @@ return cache[ key ];

}
}
};
},

@@ -191,4 +195,4 @@ static: function( containerName, key, value, dependencies ) {

fount.purgeScope = purgeScope.bind( undefined, 'default' );
fount.log = function() { console.log( containers ) };
fount.log = function() { console.log( containers ); };
module.exports = fount;
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