Skip to content

Commit

Permalink
fix(hub-common): resolve UMD Build Issues
Browse files Browse the repository at this point in the history
Drop our attempt at isomorphic Blob support, and provide internal is<type> functions. Together this
should resolve UMB build expecting global \`stream\` and \`util\` libs

AFFECTS PACKAGES:
@esri/hub-common
  • Loading branch information
dbouwman committed May 11, 2020
1 parent 1c63209 commit e60ba72
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions packages/common/src/objects/_deep-map-values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,25 @@ export function _deepMapValues(
}
}

export function _isString (v:any):boolean {
return (typeof v === 'string' || v instanceof String);
// Simple "good-enough" type checks for the tree traversal functions
// these are not bullet-proof and should not be public/docd

export function _isString(v: any): boolean {
return typeof v === "string" || v instanceof String;
}

export function _isDate (v:any):boolean {
export function _isDate(v: any): boolean {
return v instanceof Date;
}

export function _isFunction (v:any):boolean {
return typeof v === 'function';
export function _isFunction(v: any): boolean {
return typeof v === "function";
}

export function _isObject (v:any):boolean {
return typeof v === 'object';
export function _isObject(v: any): boolean {
return typeof v === "object";
}

export function _isRegExp (v:any):boolean {
export function _isRegExp(v: any): boolean {
return v instanceof RegExp;
}
}

0 comments on commit e60ba72

Please sign in to comment.