lorem-ipsum
Version:
Generates passages of lorem ipsum text suitable for use as placeholder copy in web pages, graphics, and more. Works in the browser, NodeJS, and React Native.
17 lines (14 loc) • 385 B
text/typescript
import { SUPPORTED_PLATFORMS } from "../constants/platforms";
/**
* @returns True if process is windows.
*/
const isWindows = (): boolean => {
let isWindowsResult: boolean = false;
try {
isWindowsResult = process.platform === SUPPORTED_PLATFORMS.WIN32;
} catch (e) {
isWindowsResult = false;
}
return isWindowsResult;
};
export default isWindows;