@ungap/import-node
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -15,2 +15,3 @@ /*! (c) Andrea Giammarchi - ISC */ | ||
fragment[appendChild](document[createTextNode]('')); | ||
/* istanbul ignore next */ | ||
var content = native ? | ||
@@ -23,2 +24,3 @@ document[importNode](fragment, true) : | ||
for (var | ||
/* istanbul ignore next */ | ||
childNodes = node.childNodes || [], | ||
@@ -32,2 +34,3 @@ length = childNodes.length, | ||
} : | ||
/* istanbul ignore next */ | ||
(native ? | ||
@@ -34,0 +37,0 @@ document[importNode] : |
@@ -15,2 +15,3 @@ /*! (c) Andrea Giammarchi - ISC */ | ||
fragment[appendChild](document[createTextNode]('')); | ||
/* istanbul ignore next */ | ||
var content = native ? | ||
@@ -23,2 +24,3 @@ document[importNode](fragment, true) : | ||
for (var | ||
/* istanbul ignore next */ | ||
childNodes = node.childNodes || [], | ||
@@ -32,2 +34,3 @@ length = childNodes.length, | ||
} : | ||
/* istanbul ignore next */ | ||
(native ? | ||
@@ -34,0 +37,0 @@ document[importNode] : |
@@ -15,2 +15,3 @@ /*! (c) Andrea Giammarchi - ISC */ | ||
fragment[appendChild](document[createTextNode]('')); | ||
/* istanbul ignore next */ | ||
var content = native ? | ||
@@ -23,2 +24,3 @@ document[importNode](fragment, true) : | ||
for (var | ||
/* istanbul ignore next */ | ||
childNodes = node.childNodes || [], | ||
@@ -32,2 +34,3 @@ length = childNodes.length, | ||
} : | ||
/* istanbul ignore next */ | ||
(native ? | ||
@@ -34,0 +37,0 @@ document[importNode] : |
/*! (c) Andrea Giammarchi - ISC */ | ||
var importNode=function(e,o,n,d,t){var r="importNode"in e,c=e.createDocumentFragment();return c.appendChild(e.createTextNode("g")),c.appendChild(e.createTextNode("")),(r?e.importNode(c,!0):c.cloneNode(!0)).childNodes.length<2?function i(e,o){for(var n=e.cloneNode(),d=e.childNodes||[],t=d.length,r=0;o&&r<t;r++)n.appendChild(i(d[r],o));return n}:r?e.importNode:function(e,o){return e.cloneNode(!!o)}}(document); | ||
var importNode=function(e,i,u,n,t){var o=t in e,r=e.createDocumentFragment();return r[i](e[n]("g")),r[i](e[n]("")),(o?e[t](r,!0):r[u](!0)).childNodes.length<2?function e(n,t){for(var o=n[u](),r=n.childNodes||[],d=r.length,c=0;t&&c<d;c++)o[i](e(r[c],t));return o}:o?e[t]:function(e,n){return e[u](!!n)}}(document,"appendChild","cloneNode","createTextNode","importNode"); |
{ | ||
"name": "@ungap/import-node", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "An importNode polyfill for IE11 and other legacy browsers", | ||
"main": "cjs/index.js", | ||
"module": "esm/index.js", | ||
"main": "./cjs/index.js", | ||
"module": "./esm/index.js", | ||
"unpkg": "min.js", | ||
@@ -14,4 +14,4 @@ "scripts": { | ||
"size": "cat index.js | wc -c && cat min.js | wc -c && gzip -c9 min.js | wc -c && cat min.js | brotli | wc -c", | ||
"coveralls": "cat ./coverage/lcov.info | coveralls", | ||
"test": "istanbul cover test/index.js" | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"test": "nyc node test/index.js" | ||
}, | ||
@@ -27,6 +27,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"basichtml": "^0.20.0", | ||
"coveralls": "^3.0.2", | ||
"istanbul": "^0.4.5", | ||
"uglify-js": "^2.8.29" | ||
"basichtml": "^2.2.8", | ||
"coveralls": "^3.1.0", | ||
"nyc": "^15.0.1", | ||
"uglify-js": "^3.9.1" | ||
}, | ||
@@ -40,3 +40,8 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/ungap/import-node#readme" | ||
"homepage": "https://github.com/ungap/import-node#readme", | ||
"type": "module", | ||
"exports": { | ||
"import": "./esm/index.js", | ||
"default": "./cjs/index.js" | ||
} | ||
} |
# importNode | ||
[![Build Status](https://travis-ci.com/ungap/import-node.svg?branch=master)](https://travis-ci.com/ungap/import-node) [![Coverage Status](https://coveralls.io/repos/github/ungap/import-node/badge.svg?branch=master)](https://coveralls.io/github/ungap/import-node?branch=master) ![WebReflection status](https://offline.report/status/webreflection.svg) | ||
[![Build Status](https://travis-ci.com/ungap/import-node.svg?branch=master)](https://travis-ci.com/ungap/import-node) [![Coverage Status](https://coveralls.io/repos/github/ungap/import-node/badge.svg?branch=master)](https://coveralls.io/github/ungap/import-node?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/ungap/import-node.svg)](https://greenkeeper.io/) ![WebReflection status](https://offline.report/status/webreflection.svg) | ||
@@ -8,5 +8,5 @@ A document [importNode](https://developer.mozilla.org/en-US/docs/Web/API/Document/importNode) polyfill for IE11 and other legacy browsers, with a proper feature detection for deep clones. | ||
* CDN global utility via https://unpkg.com/@ungap/import-node | ||
* ESM via `import createContent from '@ungap/import-node'` | ||
* CJS via `const createContent = require('@ungap/import-node')` | ||
* ESM via `import importNode from '@ungap/import-node'` | ||
* CJS via `const importNode = require('@ungap/import-node')` | ||
[Live test](https://ungap.github.io/import-node/test/) |
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
7184
8
138
Yes