Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getSymbolInjectionToken(symbol, method, externals) {
const interceptor = findInterceptor(symbol, method, externals);
return {
token: new core_1.InjectionToken(core_1.createUniqueHash(`${interceptor}`)),
interceptor
};
}
function setPart(externals, resolver, symbolMap) {
.map(symbol => {
const [isPresent] = directives.filter(d => d.includes(symbol.map));
if (isPresent) {
const injector = isPresent.replace(/[^\w\s]/gi, '').replace(/ +?/g, '');
const method = symbol.module[injector];
if (!method) {
throw new Error(`Missing method ${injector} inside ${symbol.file}`);
}
return {
symbol: symbol.map,
token: new core_1.InjectionToken(core_1.createUniqueHash(`${method}`)),
module: symbol.module,
method,
injector
};
}
})
.filter(i => !!i);