@uform/utils
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -52,2 +52,5 @@ "use strict"; | ||
} | ||
if (values._isAMomentObject) { | ||
return values; | ||
} | ||
if (Object.getOwnPropertySymbols(values || {}).length) { | ||
@@ -54,0 +57,0 @@ return values; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.globalThisPolyfill = self || window || global || Function('return this')(); | ||
function globalThis() { | ||
if (typeof self !== 'undefined') { | ||
return self; | ||
} | ||
if (typeof window !== 'undefined') { | ||
return window; | ||
} | ||
if (typeof global !== 'undefined') { | ||
return global; | ||
} | ||
return Function('return this')(); | ||
} | ||
exports.globalThisPolyfill = globalThis(); |
{ | ||
"name": "@uform/utils", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"license": "MIT", | ||
@@ -21,3 +21,3 @@ "main": "lib", | ||
}, | ||
"gitHead": "7fe42c7f3f48a2b4dc924e4ec78e3c2187718108", | ||
"gitHead": "c08c1ffd3e86f941f281ae8e691cca92320cf93d", | ||
"scripts": { | ||
@@ -33,5 +33,5 @@ "build": "tsc --declaration" | ||
"dependencies": { | ||
"@uform/types": "^0.4.1", | ||
"@uform/types": "^0.4.2", | ||
"camel-case": "^3.0.0" | ||
} | ||
} |
@@ -55,2 +55,5 @@ import { isFn } from '@uform/types' | ||
} | ||
if (values._isAMomentObject) { | ||
return values | ||
} | ||
if (Object.getOwnPropertySymbols(values || {}).length) { | ||
@@ -57,0 +60,0 @@ return values |
@@ -1,2 +0,13 @@ | ||
export const globalThisPolyfill = | ||
self || window || global || Function('return this')() | ||
function globalThis() { | ||
if (typeof self !== 'undefined') { | ||
return self | ||
} | ||
if (typeof window !== 'undefined') { | ||
return window | ||
} | ||
if (typeof global !== 'undefined') { | ||
return global | ||
} | ||
return Function('return this')() | ||
} | ||
export const globalThisPolyfill = globalThis() |
87569
2945
Updated@uform/types@^0.4.2