Comparing version 1.2.0-beta.1 to 1.2.0-beta.2
@@ -0,1 +1,7 @@ | ||
/*! | ||
* mount-css v1.2.0-beta.2 | ||
* A simple function for mounting css | ||
* (c) 2021-2023 saqqdy<https://github.com/saqqdy> | ||
* Released under the MIT License. | ||
*/ | ||
/** | ||
@@ -2,0 +8,0 @@ * Dynamic loading of css link resources |
@@ -1,1 +0,7 @@ | ||
function e(e,r){if(r===void 0){r={}}if(!e)throw new Error("[mountCss]: url is required");var t=r.attrs,n=r.props,o=r.force,a=o===void 0?false:o;return new Promise((function(r,o){if(!a&&document.querySelector('link[href="'.concat(e,'"]'))){r(true);return}var i=document.createElement("link");var d,l;if(t){for(d in t){i[d]=t[d]}}if(n){for(l in n){i[l]=n[l]}}i.rel="stylesheet";i.type="text/css";i.href=e;document.getElementsByTagName("head")[0].appendChild(i);i.onload=i.onreadystatechange=function(){if(!i.readyState||["loaded","complete"].includes(i.readyState)){i.onload=i.onreadystatechange=null;r(true)}};i.onerror=o}))}export{e as default}; | ||
/*! | ||
* mount-css v1.2.0-beta.2 | ||
* A simple function for mounting css | ||
* (c) 2021-2023 saqqdy<https://github.com/saqqdy> | ||
* Released under the MIT License. | ||
*/ | ||
function e(e,t){if(void 0===t&&(t={}),!e)throw new Error("[mountCss]: url is required");var r=t.attrs,n=t.props,o=t.force,a=void 0!==o&&o;return new Promise((function(t,o){if(a||!document.querySelector('link[href="'.concat(e,'"]'))){var d,i,l=document.createElement("link");if(r)for(d in r)l[d]=r[d];if(n)for(i in n)l[i]=n[i];l.rel="stylesheet",l.type="text/css",l.href=e,document.getElementsByTagName("head")[0].appendChild(l),l.onload=l.onreadystatechange=function(){l.readyState&&!["loaded","complete"].includes(l.readyState)||(l.onload=l.onreadystatechange=null,t(!0))},l.onerror=o}else t(!0)}))}export{e as default}; |
/*! | ||
* mount-css v1.2.0-beta.1 | ||
* mount-css v1.2.0-beta.2 | ||
* A simple function for mounting css | ||
@@ -7,3 +7,3 @@ * (c) 2021-2023 saqqdy<https://github.com/saqqdy> | ||
*/ | ||
this.jsCool = (function () { | ||
this.mountCss = (function () { | ||
'use strict'; | ||
@@ -10,0 +10,0 @@ |
@@ -1,1 +0,7 @@ | ||
this.jsCool=function(){"use strict";function e(e,t){if(t===void 0){t={}}if(!e)throw new Error("[mountCss]: url is required");var r=t.attrs,n=t.props,o=t.force,a=o===void 0?false:o;return new Promise((function(t,o){if(!a&&document.querySelector('link[href="'.concat(e,'"]'))){t(true);return}var i=document.createElement("link");var s,u;if(r){for(s in r){i[s]=r[s]}}if(n){for(u in n){i[u]=n[u]}}i.rel="stylesheet";i.type="text/css";i.href=e;document.getElementsByTagName("head")[0].appendChild(i);i.onload=i.onreadystatechange=function(){if(!i.readyState||["loaded","complete"].includes(i.readyState)){i.onload=i.onreadystatechange=null;t(true)}};i.onerror=o}))}return e}(); | ||
/*! | ||
* mount-css v1.2.0-beta.2 | ||
* A simple function for mounting css | ||
* (c) 2021-2023 saqqdy<https://github.com/saqqdy> | ||
* Released under the MIT License. | ||
*/ | ||
this.mountCss=function(){"use strict";return function(e,t){if(void 0===t&&(t={}),!e)throw new Error("[mountCss]: url is required");var n=t.attrs,r=t.props,o=t.force,a=void 0!==o&&o;return new Promise((function(t,o){if(a||!document.querySelector('link[href="'.concat(e,'"]'))){var i,s,c=document.createElement("link");if(n)for(i in n)c[i]=n[i];if(r)for(s in r)c[s]=r[s];c.rel="stylesheet",c.type="text/css",c.href=e,document.getElementsByTagName("head")[0].appendChild(c),c.onload=c.onreadystatechange=function(){c.readyState&&!["loaded","complete"].includes(c.readyState)||(c.onload=c.onreadystatechange=null,t(!0))},c.onerror=o}else t(!0)}))}}(); |
{ | ||
"name": "mount-css", | ||
"description": "A simple function for mounting css", | ||
"version": "1.2.0-beta.1", | ||
"packageManager": "pnpm@8.5.1", | ||
"version": "1.2.0-beta.2", | ||
"packageManager": "pnpm@8.6.0", | ||
"main": "dist/index.cjs.js", | ||
@@ -7,0 +7,0 @@ "module": "dist/index.esm-bundler.js", |
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
14371
289