@ensdomains/ens-avatar
Advanced tools
Comparing version 1.0.0-alpha.2.ethers.6 to 1.0.0-alpha.3.ethers.6
@@ -312,3 +312,5 @@ 'use strict'; | ||
// purges malicious scripting from svg content | ||
var cleanDOM = DOMPurify.sanitize(data); | ||
var cleanDOM = DOMPurify.sanitize(data, { | ||
FORBID_TAGS: ['a', 'area', 'base', 'iframe', 'link'] | ||
}); | ||
return Buffer.from(cleanDOM); | ||
@@ -340,24 +342,3 @@ } | ||
// ref: https://github.com/flexdinesh/browser-or-node/blob/master/src/index.ts | ||
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; | ||
typeof process !== 'undefined' && | ||
process.versions != null && | ||
process.versions.node != null; | ||
// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327 | ||
(typeof window !== 'undefined' && window.name === 'nodejs') || | ||
(typeof navigator !== 'undefined' && | ||
'userAgent' in navigator && | ||
typeof navigator.userAgent === 'string' && | ||
(navigator.userAgent.includes('Node.js') || | ||
navigator.userAgent.includes('jsdom'))); | ||
// @ts-expect-error | ||
typeof Deno !== 'undefined' && | ||
// @ts-expect-error | ||
typeof Deno.version !== 'undefined' && | ||
// @ts-expect-error | ||
typeof Deno.version.deno !== 'undefined'; | ||
/** @see {@link https://bun.sh/guides/util/detect-bun} */ | ||
typeof process !== 'undefined' && | ||
process.versions != null && | ||
process.versions.bun != null; | ||
@@ -364,0 +345,0 @@ function createAgentAdapter(fetch, agents) { |
declare const isBrowser: boolean; | ||
declare const isNode: boolean; | ||
declare const isWebWorker: boolean; | ||
declare const isJsDom: boolean; | ||
declare const isDeno: boolean; | ||
/** @see {@link https://bun.sh/guides/util/detect-bun} */ | ||
declare const isBun: boolean; | ||
export { isBrowser, isWebWorker, isNode, isJsDom, isDeno, isBun }; | ||
export { isBrowser }; |
@@ -1,24 +0,3 @@ | ||
// ref: https://github.com/flexdinesh/browser-or-node/blob/master/src/index.ts | ||
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; | ||
typeof process !== 'undefined' && | ||
process.versions != null && | ||
process.versions.node != null; | ||
// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327 | ||
(typeof window !== 'undefined' && window.name === 'nodejs') || | ||
(typeof navigator !== 'undefined' && | ||
'userAgent' in navigator && | ||
typeof navigator.userAgent === 'string' && | ||
(navigator.userAgent.includes('Node.js') || | ||
navigator.userAgent.includes('jsdom'))); | ||
// @ts-expect-error | ||
typeof Deno !== 'undefined' && | ||
// @ts-expect-error | ||
typeof Deno.version !== 'undefined' && | ||
// @ts-expect-error | ||
typeof Deno.version.deno !== 'undefined'; | ||
/** @see {@link https://bun.sh/guides/util/detect-bun} */ | ||
typeof process !== 'undefined' && | ||
process.versions != null && | ||
process.versions.bun != null; | ||
export { isBrowser }; |
@@ -69,3 +69,5 @@ import createDOMPurify from 'dompurify'; | ||
// purges malicious scripting from svg content | ||
var cleanDOM = DOMPurify.sanitize(data); | ||
var cleanDOM = DOMPurify.sanitize(data, { | ||
FORBID_TAGS: ['a', 'area', 'base', 'iframe', 'link'] | ||
}); | ||
return Buffer.from(cleanDOM); | ||
@@ -72,0 +74,0 @@ } |
{ | ||
"version": "1.0.0-alpha.2.ethers.6", | ||
"version": "1.0.0-alpha.3.ethers.6", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -1,38 +0,4 @@ | ||
// ref: https://github.com/flexdinesh/browser-or-node/blob/master/src/index.ts | ||
const isBrowser: boolean = | ||
typeof window !== 'undefined' && typeof window.document !== 'undefined'; | ||
const isNode: boolean = | ||
typeof process !== 'undefined' && | ||
process.versions != null && | ||
process.versions.node != null; | ||
const isWebWorker: boolean = | ||
typeof self === 'object' && | ||
self.constructor && | ||
self.constructor.name === 'DedicatedWorkerGlobalScope'; | ||
// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327 | ||
const isJsDom: boolean = | ||
(typeof window !== 'undefined' && window.name === 'nodejs') || | ||
(typeof navigator !== 'undefined' && | ||
'userAgent' in navigator && | ||
typeof navigator.userAgent === 'string' && | ||
(navigator.userAgent.includes('Node.js') || | ||
navigator.userAgent.includes('jsdom'))); | ||
const isDeno: boolean = | ||
// @ts-expect-error | ||
typeof Deno !== 'undefined' && | ||
// @ts-expect-error | ||
typeof Deno.version !== 'undefined' && | ||
// @ts-expect-error | ||
typeof Deno.version.deno !== 'undefined'; | ||
/** @see {@link https://bun.sh/guides/util/detect-bun} */ | ||
const isBun = | ||
typeof process !== 'undefined' && | ||
process.versions != null && | ||
process.versions.bun != null; | ||
export { isBrowser, isWebWorker, isNode, isJsDom, isDeno, isBun }; | ||
export { isBrowser }; |
@@ -74,3 +74,5 @@ import createDOMPurify from 'dompurify'; | ||
// purges malicious scripting from svg content | ||
const cleanDOM = DOMPurify.sanitize(data); | ||
const cleanDOM = DOMPurify.sanitize(data, { | ||
FORBID_TAGS: ['a', 'area', 'base', 'iframe', 'link'], | ||
}); | ||
return Buffer.from(cleanDOM); | ||
@@ -77,0 +79,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104165
2355