diff --git a/src/util/isEM.ts b/src/util/isEM.ts index 40a5494b67..affb63f404 100644 --- a/src/util/isEM.ts +++ b/src/util/isEM.ts @@ -1,7 +1,9 @@ import Context from '../@types/Context' import Path from '../@types/Path' import { EM_TOKEN } from '../constants' -import isPath from './isPath' + +/** Checks if an object is of type Path. */ +const isPath = (o: Context | Path): o is Path => o.length > 0 && Object.prototype.hasOwnProperty.call(o[0], 'value') /** Returns true if the Path is the EM_TOKEN. */ const isEM = (thoughts: Context | Path): boolean => diff --git a/src/util/isPath.ts b/src/util/isPath.ts deleted file mode 100644 index ab6af2a659..0000000000 --- a/src/util/isPath.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Context from '../@types/Context' -import Path from '../@types/Path' - -/** Checks if an object is of type Path. */ -const isPath = (o: Context | Path): o is Path => o.length > 0 && Object.prototype.hasOwnProperty.call(o[0], 'value') - -export default isPath