Add function docs

This commit is contained in:
Leonid Logvinov
2018-03-16 16:54:48 +01:00
parent 8b52793f2f
commit 477daf4168
2 changed files with 6 additions and 0 deletions

View File

@@ -77,6 +77,11 @@ export function getNormalizedErrMsg(errMsg: string): string {
return normalizedErrMsg;
}
/**
* Parses the contract source code and extracts the dendencies
* @param source Contract source code
* @return List of dependendencies
*/
export function parseDependencies(source: string): string[] {
// TODO: Use a proper parser
const IMPORT_REGEX = /(import\s)/;

View File

@@ -1,5 +1,6 @@
import { logUtils } from '@0xproject/utils';
// Makes an async function no-throw printing errors to the console
export function consoleReporter<T>(asyncFn: (arg: T) => Promise<void>) {
const noThrowFnAsync = async (arg: T) => {
try {