@app-config/utils
Advanced tools
Comparing version 2.5.2 to 2.6.0
export declare const isBrowser: boolean; | ||
export declare const isNode: boolean; | ||
export declare const isWindows: boolean; | ||
export declare const packageNameRegex: RegExp; | ||
export declare type JsonPrimitive = number | string | boolean | null; | ||
@@ -5,0 +6,0 @@ export interface JsonObject { |
export const isBrowser = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9; | ||
export const isNode = typeof process !== 'undefined' && !isBrowser; | ||
export const isWindows = isNode && /^win/.test(process.platform); | ||
export const packageNameRegex = /(^@(lcdev|servall)\/app-config)|(^@app-config\/main)|(\.?app-config(\.\w+)?\.(toml|yml|yaml|json|json5))|(\.config-placeholder)/; | ||
export function isObject(obj) { | ||
@@ -5,0 +6,0 @@ return typeof obj === 'object' && !Array.isArray(obj) && obj !== null; |
export declare const isBrowser: boolean; | ||
export declare const isNode: boolean; | ||
export declare const isWindows: boolean; | ||
export declare const packageNameRegex: RegExp; | ||
export declare type JsonPrimitive = number | string | boolean | null; | ||
@@ -5,0 +6,0 @@ export interface JsonObject { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isPrimitive = exports.isObject = exports.isWindows = exports.isNode = exports.isBrowser = void 0; | ||
exports.isPrimitive = exports.isObject = exports.packageNameRegex = exports.isWindows = exports.isNode = exports.isBrowser = void 0; | ||
exports.isBrowser = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9; | ||
exports.isNode = typeof process !== 'undefined' && !exports.isBrowser; | ||
exports.isWindows = exports.isNode && /^win/.test(process.platform); | ||
exports.packageNameRegex = /(^@(lcdev|servall)\/app-config)|(^@app-config\/main)|(\.?app-config(\.\w+)?\.(toml|yml|yaml|json|json5))|(\.config-placeholder)/; | ||
function isObject(obj) { | ||
@@ -8,0 +9,0 @@ return typeof obj === 'object' && !Array.isArray(obj) && obj !== null; |
{ | ||
"name": "@app-config/utils", | ||
"description": "Common utilities used in @app-config", | ||
"version": "2.5.2", | ||
"version": "2.6.0", | ||
"license": "MPL-2.0", | ||
@@ -6,0 +6,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5179
51