resolveAll
now can resolve values from nested namespaces. Optional.
const modules = container.resolveAll('my-root-namespace', true);
for (const prop in modules) {
if (modules.hasOwnProperty(prop)) {
const values = modules[prop];
values.forEach((currentValue) => {
console.log(currentValue);
});
}
}
- Better type check for all input args.
size
,clear
andresolveAll
can receive a Namespace instance now.
- Stoarge size calculation (now it tracks changes)
panic
params that prevents throwing an error on resolving not existing module.clear([namespace])
method that allows to clear either a whole container or a given namespace.size([namespace])
method that returns a size of either a whole container or a given namespace.
- Dropped Bower support
- Moved to Symbols. All internals are secured.
- Code clean up.
- Updated 'npmignore' rules in order to ignore build related files.
- Fixed build for IE
- Circular dependency check
- Circular dependency check
Container.map
did not handle properly array as input.
- Error when used names from
Object.prototype
- Custom resolver for modules
// global resolver
container.service('my-service-1', () => {
return ['dep1', 'dep2'];
}, MyServiceClass);
// per-dependency-resolver-with
container.service('my-service-2', [
'my-service-1',
() => {
return 'foo';
}
], MyService2Class);
map
functions now can resolve multiple paths
const namespaces = map({
core: {
infrastructure: [
'item1',
'item2'
],
domain: 'foo'
},
system: [
'component1',
'component2'
]
});
const paths = namespaces.system([
'component1',
'component2'
]);
// ['system/component1', 'system/component2']
- improved error messaging
map
couldn't resolve object inside array.- Module created via
factory
initialized only once if the value is function.
contains
method that determines by passed path whether there is something registered.
- Location of namespace helper
const
method for namespace. Registers values which are resolved as they are.getName
for namespace- utility function
map
register
New shiny API!
- Registration methods on container level for root objects.
- New chained method
namespace
. - Module name validation (doesn't allow to register name with separators)
- Multiple usage of module registrator
Fixed npm
package.
value
supportservice
supportfactory
support