Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dangerous-html

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dangerous-html - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

2

dist/react/lib.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc