New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uhandlers

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uhandlers - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

8

cjs/index.js

@@ -12,3 +12,9 @@ 'use strict';

let oldValue, orphan = true;
const attributeNode = document.createAttribute(name);
/* istanbul ignore next */
const attributeNode = document.createAttributeNS(
`http://www.w3.org/${
'ownerSVGElement' in node ? '2000/svg' : '1999/xhtml'
}`,
name
);
return newValue => {

@@ -15,0 +21,0 @@ if (oldValue !== newValue) {

2

es.js

@@ -1,1 +0,1 @@

var uhtmlHandlers=function(t){"use strict";const{isArray:e}=Array;return t.aria=t=>e=>{for(const r in e)t.setAttribute("role"===r?r:`aria-${r}`,e[r])},t.attribute=(t,e)=>{let r,n=!0;const o=document.createAttribute(e);return e=>{r!==e&&(r=e,null==r?n||(t.removeAttributeNode(o),n=!0):(o.value=e,n&&(t.setAttributeNode(o),n=!1)))}},t.data=({dataset:t})=>e=>{for(const r in e)t[r]=e[r]},t.event=(t,r)=>{let n,o=r.slice(2);return!(r in t)&&r.toLowerCase()in t&&(o=o.toLowerCase()),r=>{const a=e(r)?r:[r,!1];n!==a[0]&&(n&&t.removeEventListener(o,n,a[1]),(n=a[0])&&t.addEventListener(o,n,a[1]))}},t.ref=t=>e=>{"function"==typeof e?e(t):e.current=t},t.setter=(t,e)=>r=>{t[e]=r},t.text=t=>{let e;return r=>{e!=r&&(e=r,t.textContent=null==r?"":r)}},t}({});
var uhtmlHandlers=function(t){"use strict";const{isArray:e}=Array;return t.aria=t=>e=>{for(const r in e)t.setAttribute("role"===r?r:"aria-"+r,e[r])},t.attribute=(t,e)=>{let r,n=!0;const o=document.createAttributeNS("http://www.w3.org/"+("ownerSVGElement"in t?"2000/svg":"1999/xhtml"),e);return e=>{r!==e&&(r=e,null==r?n||(t.removeAttributeNode(o),n=!0):(o.value=e,n&&(t.setAttributeNode(o),n=!1)))}},t.data=({dataset:t})=>e=>{for(const r in e)t[r]=e[r]},t.event=(t,r)=>{let n,o=r.slice(2);return!(r in t)&&r.toLowerCase()in t&&(o=o.toLowerCase()),r=>{const i=e(r)?r:[r,!1];n!==i[0]&&(n&&t.removeEventListener(o,n,i[1]),(n=i[0])&&t.addEventListener(o,n,i[1]))}},t.ref=t=>e=>{"function"==typeof e?e(t):e.current=t},t.setter=(t,e)=>r=>{t[e]=r},t.text=t=>{let e;return r=>{e!=r&&(e=r,t.textContent=null==r?"":r)}},t}({});

@@ -10,3 +10,9 @@ import {isArray} from 'uarray';

let oldValue, orphan = true;
const attributeNode = document.createAttribute(name);
/* istanbul ignore next */
const attributeNode = document.createAttributeNS(
`http://www.w3.org/${
'ownerSVGElement' in node ? '2000/svg' : '1999/xhtml'
}`,
name
);
return newValue => {

@@ -13,0 +19,0 @@ if (oldValue !== newValue) {

@@ -16,3 +16,5 @@ var uhtmlHandlers = (function (exports) {

orphan = true;
var attributeNode = document.createAttribute(name);
/* istanbul ignore next */
var attributeNode = document.createAttributeNS("http://www.w3.org/".concat('ownerSVGElement' in node ? '2000/svg' : '1999/xhtml'), name);
return function (newValue) {

@@ -19,0 +21,0 @@ if (oldValue !== newValue) {

@@ -1,1 +0,1 @@

var uhtmlHandlers=function(t){"use strict";var i=Array.isArray;return t.aria=function(r){return function(t){for(var n in t)r.setAttribute("role"===n?n:"aria-".concat(n),t[n])}},t.attribute=function(n,t){var r,e=!0,u=document.createAttribute(t);return function(t){r!==t&&(null==(r=t)?e||(n.removeAttributeNode(u),e=!0):(u.value=t,e&&(n.setAttributeNode(u),e=!1)))}},t.data=function(t){var r=t.dataset;return function(t){for(var n in t)r[n]=t[n]}},t.event=function(r,t){var e,u=t.slice(2);return!(t in r)&&t.toLowerCase()in r&&(u=u.toLowerCase()),function(t){var n=i(t)?t:[t,!1];e!==n[0]&&(e&&r.removeEventListener(u,e,n[1]),(e=n[0])&&r.addEventListener(u,e,n[1]))}},t.ref=function(n){return function(t){"function"==typeof t?t(n):t.current=n}},t.setter=function(n,r){return function(t){n[r]=t}},t.text=function(n){var r;return function(t){r!=t&&(r=t,n.textContent=null==t?"":t)}},t}({});
var uhtmlHandlers=function(t){"use strict";var o=Array.isArray;return t.aria=function(r){return function(t){for(var n in t)r.setAttribute("role"===n?n:"aria-".concat(n),t[n])}},t.attribute=function(n,t){var r,e=!0,u=document.createAttributeNS("http://www.w3.org/".concat("ownerSVGElement"in n?"2000/svg":"1999/xhtml"),t);return function(t){r!==t&&(null==(r=t)?e||(n.removeAttributeNode(u),e=!0):(u.value=t,e&&(n.setAttributeNode(u),e=!1)))}},t.data=function(t){var r=t.dataset;return function(t){for(var n in t)r[n]=t[n]}},t.event=function(r,t){var e,u=t.slice(2);return!(t in r)&&t.toLowerCase()in r&&(u=u.toLowerCase()),function(t){var n=o(t)?t:[t,!1];e!==n[0]&&(e&&r.removeEventListener(u,e,n[1]),(e=n[0])&&r.addEventListener(u,e,n[1]))}},t.ref=function(n){return function(t){"function"==typeof t?t(n):t.current=n}},t.setter=function(n,r){return function(t){n[r]=t}},t.text=function(n){var r;return function(t){r!=t&&(r=t,n.textContent=null==t?"":t)}},t}({});
{
"name": "uhandlers",
"version": "0.2.0",
"version": "0.3.0",
"description": "µhtml attributes handlers",

@@ -24,12 +24,12 @@ "main": "./cjs/index.js",

"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"ascjs": "^3.1.2",
"basichtml": "^2.2.1",
"coveralls": "^3.0.11",
"nyc": "^15.0.0",
"rollup": "^2.2.0",
"@babel/preset-env": "^7.9.5",
"ascjs": "^4.0.0",
"basichtml": "^2.2.6",
"coveralls": "^3.1.0",
"nyc": "^15.0.1",
"rollup": "^2.7.2",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.3.0",
"uglify-js": "^3.8.0"
"uglify-js": "^3.9.1"
},

@@ -36,0 +36,0 @@ "module": "./esm/index.js",

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