UNPKG

@gecut/utilities

Version:

The ultimate utility toolkit from Gecut Company, crafted with TypeScript for optimal speed and efficiency. Designed to boost productivity with a suite of fast and optimized tools.

21 lines 521 B
export function isBrowser() { return typeof window === 'object'; } export function requiredBrowser() { const _isBrowser = isBrowser(); if (_isBrowser !== true) { throw new Error('requiredBrowser'); } return _isBrowser; } export function isNode() { return typeof process === 'object'; } export function requiredNode() { const _isNode = isNode(); if (_isNode !== true) { throw new Error('requiredNode'); } return _isNode; } //# sourceMappingURL=browser-or-node.js.map