dangerous-html
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -1,1 +0,1 @@ | ||
"use strict";const e=require("react"),c=({html:t})=>{const r=e.useRef(null);return e.useEffect(()=>{if(!t||!(void 0).ref.current)return;const n=document.createRange().createContextualFragment((void 0).html);(void 0).ref.current.append(n)},[]),React.createElement("div",{ref:r})};module.exports=c; | ||
"use strict";const n=require("react"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=c(n),u=({html:e})=>{const t=n.useRef(null);return n.useEffect(()=>{if(!e||!t.current)return;const r=document.createRange().createContextualFragment(e);t.current.append(r)},[]),a.default.createElement("div",{ref:t})};module.exports=u; |
@@ -1,1 +0,1 @@ | ||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t(require("react")):typeof define=="function"&&define.amd?define(["react"],t):(e=typeof globalThis<"u"?globalThis:e||self,e.DangerousHTML=t(e.React))})(this,function(e){"use strict";return({html:n})=>{const r=e.useRef(null);return e.useEffect(()=>{if(!n||!(void 0).ref.current)return;const u=document.createRange().createContextualFragment((void 0).html);(void 0).ref.current.append(u)},[]),React.createElement("div",{ref:r})}}); | ||
(function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("react")):typeof define=="function"&&define.amd?define(["react"],n):(e=typeof globalThis<"u"?globalThis:e||self,e.DangerousHTML=n(e.React))})(this,function(e){"use strict";const r=(t=>t&&typeof t=="object"&&"default"in t?t:{default:t})(e);return({html:t})=>{const u=e.useRef(null);return e.useEffect(()=>{if(!t||!u.current)return;const o=document.createRange().createContextualFragment(t);u.current.append(o)},[]),r.default.createElement("div",{ref:u})}}); |
{ | ||
"name": "dangerous-html", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "", | ||
@@ -26,3 +26,3 @@ "main": "dist/default/lib.js", | ||
"scripts": { | ||
"test": "vite build && cp dist/lib.umd.js example/ && http-server example/", | ||
"test": "yarn build && cp dist/default/lib.umd.js example/ && http-server example/", | ||
"build": "yarn build:umd && yarn build:mod && yarn build:react && yarn build:vue", | ||
@@ -29,0 +29,0 @@ "build:umd": "vite build", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
30136
327
0