face-api/src/dom/resolveInput.ts

8 lines
191 B
TypeScript
Raw Normal View History

2020-08-18 13:54:53 +02:00
import { env } from '../env';
export function resolveInput(arg: string | any) {
if (!env.isNodejs() && typeof arg === 'string') {
return document.getElementById(arg)
}
return arg
}