Skip to content

Instantly share code, notes, and snippets.

@kobvel
Last active January 29, 2018 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobvel/45da35aed3c6a93caf833741fa382992 to your computer and use it in GitHub Desktop.
Save kobvel/45da35aed3c6a93caf833741fa382992 to your computer and use it in GitHub Desktop.
import { InjectionToken, ValueProvider } from '@angular/core';
interface IHashwords {
hash: (hash: string) => string[];
hashStr: (hash: string) => string;
random: () => string[];
randomStr: () => string;
}
const Hashwords: InjectionToken<IHashwords> = new InjectionToken<IHashwords>('hashwords');
const HashwordsProvider: ValueProvider = { provide: Hashwords, useValue: window['hashwords']() };
export { IHashwords, Hashwords, HashwordsProvider };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment