UNPKG

typemoq

Version:

A simple mocking library for TypeScript

15 lines (13 loc) 427 B
export class Utils { static isPhantomJS(): boolean { let userAgent = navigator.userAgent; let found = userAgent.toLocaleLowerCase().indexOf("phantomjs"); return found > 0 ? true : false; } static isNodeJS(): boolean { let found = false; if (typeof module !== "undefined" && module.exports) found = true; return found; } }