How to use the @gapi/core.createUniqueHash function in @gapi/core

To help you get started, we’ve selected a few @gapi/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rxdi / graphqj / lib / helpers / advanced-schema.js View on Github external
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) {
github rxdi / graphqj / lib / helpers / advanced-schema.js View on Github external
.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);