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.3.6 to 0.4.0

8

cjs/index.js

@@ -40,2 +40,10 @@ 'use strict';

const boolean = (node, key) => value => {
if (value)
node.setAttribute(key, '');
else
node.removeAttribute(key);
};
exports.boolean = boolean;
const data = ({dataset}) => values => {

@@ -42,0 +50,0 @@ for (const key in values) {

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){const n="role"===r?r:"aria-"+r,o=e[r];null==o?t.removeAttribute(n):t.setAttribute(n,o)}},t.attribute=(t,e)=>{let r,n=!0;const o=document.createAttributeNS(null,e);return e=>{r!==e&&(r=e,null==r?n||(t.removeAttributeNode(o),n=!0):(o.value=e,n&&(t.setAttributeNodeNS(o),n=!1)))}},t.data=({dataset:t})=>e=>{for(const r in e){const n=e[r];null==n?delete t[r]:t[r]=n}},t.event=(t,r)=>{let n,o=r.slice(2);return!(r in t)&&r.toLowerCase()in t&&(o=o.toLowerCase()),r=>{const u=e(r)?r:[r,!1];n!==u[0]&&(n&&t.removeEventListener(o,n,u[1]),(n=u[0])&&t.addEventListener(o,n,u[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){const n="role"===r?r:`aria-${r}`,o=e[r];null==o?t.removeAttribute(n):t.setAttribute(n,o)}},t.attribute=(t,e)=>{let r,n=!0;const o=document.createAttributeNS(null,e);return e=>{r!==e&&(r=e,null==r?n||(t.removeAttributeNode(o),n=!0):(o.value=e,n&&(t.setAttributeNodeNS(o),n=!1)))}},t.boolean=(t,e)=>r=>{r?t.setAttribute(e,""):t.removeAttribute(e)},t.data=({dataset:t})=>e=>{for(const r in e){const n=e[r];null==n?delete t[r]:t[r]=n}},t.event=(t,r)=>{let n,o=r.slice(2);return!(r in t)&&r.toLowerCase()in t&&(o=o.toLowerCase()),r=>{const u=e(r)?r:[r,!1];n!==u[0]&&(n&&t.removeEventListener(o,n,u[1]),(n=u[0])&&t.addEventListener(o,n,u[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}({});

@@ -37,2 +37,9 @@ import {isArray} from 'uarray';

export const boolean = (node, key) => value => {
if (value)
node.setAttribute(key, '');
else
node.removeAttribute(key);
};
export const data = ({dataset}) => values => {

@@ -39,0 +46,0 @@ for (const key in values) {

@@ -39,2 +39,8 @@ var uhtmlHandlers = (function (exports) {

};
var _boolean = function _boolean(node, key) {
return function (value) {
if (value) node.setAttribute(key, '');else node.removeAttribute(key);
};
};
var data = function data(_ref) {

@@ -84,2 +90,3 @@ var dataset = _ref.dataset;

exports.attribute = attribute;
exports.boolean = _boolean;
exports.data = data;

@@ -86,0 +93,0 @@ exports.event = event;

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

var uhtmlHandlers=function(t){"use strict";var n=Array.isArray;return t.aria=function(t){return function(n){for(var e in n){var r="role"===e?e:"aria-".concat(e),u=n[e];null==u?t.removeAttribute(r):t.setAttribute(r,u)}}},t.attribute=function(t,n){var e,r=!0,u=document.createAttributeNS(null,n);return function(n){e!==n&&(null==(e=n)?r||(t.removeAttributeNode(u),r=!0):(u.value=n,r&&(t.setAttributeNodeNS(u),r=!1)))}},t.data=function(t){var n=t.dataset;return function(t){for(var e in t){var r=t[e];null==r?delete n[e]:n[e]=r}}},t.event=function(t,e){var r,u=e.slice(2);return!(e in t)&&e.toLowerCase()in t&&(u=u.toLowerCase()),function(e){var i=n(e)?e:[e,!1];r!==i[0]&&(r&&t.removeEventListener(u,r,i[1]),(r=i[0])&&t.addEventListener(u,r,i[1]))}},t.ref=function(t){return function(n){"function"==typeof n?n(t):n.current=t}},t.setter=function(t,n){return function(e){t[n]=e}},t.text=function(t){var n;return function(e){n!=e&&(n=e,t.textContent=null==e?"":e)}},t}({});
var uhtmlHandlers=function(t){"use strict";var n=Array.isArray;return t.aria=function(t){return function(n){for(var e in n){var r="role"===e?e:"aria-".concat(e),u=n[e];null==u?t.removeAttribute(r):t.setAttribute(r,u)}}},t.attribute=function(t,n){var e,r=!0,u=document.createAttributeNS(null,n);return function(n){e!==n&&(null==(e=n)?r||(t.removeAttributeNode(u),r=!0):(u.value=n,r&&(t.setAttributeNodeNS(u),r=!1)))}},t.boolean=function(t,n){return function(e){e?t.setAttribute(n,""):t.removeAttribute(n)}},t.data=function(t){var n=t.dataset;return function(t){for(var e in t){var r=t[e];null==r?delete n[e]:n[e]=r}}},t.event=function(t,e){var r,u=e.slice(2);return!(e in t)&&e.toLowerCase()in t&&(u=u.toLowerCase()),function(e){var i=n(e)?e:[e,!1];r!==i[0]&&(r&&t.removeEventListener(u,r,i[1]),(r=i[0])&&t.addEventListener(u,r,i[1]))}},t.ref=function(t){return function(n){"function"==typeof n?n(t):n.current=t}},t.setter=function(t,n){return function(e){t[n]=e}},t.text=function(t){var n;return function(e){n!=e&&(n=e,t.textContent=null==e?"":e)}},t}({});
{
"name": "uhandlers",
"version": "0.3.6",
"version": "0.4.0",
"description": "µhtml attributes handlers",

@@ -23,13 +23,13 @@ "main": "./cjs/index.js",

"devDependencies": {
"@babel/core": "^7.11.4",
"@babel/preset-env": "^7.11.0",
"@rollup/plugin-babel": "^5.2.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"ascjs": "^4.0.1",
"basichtml": "^2.3.0",
"@babel/core": "^7.12.13",
"@babel/preset-env": "^7.12.13",
"@rollup/plugin-babel": "^5.2.3",
"@rollup/plugin-node-resolve": "^11.1.1",
"ascjs": "^5.0.0",
"coveralls": "^3.1.0",
"linkedom": "^0.4.12",
"nyc": "^15.1.0",
"rollup": "^2.26.5",
"rollup-plugin-terser": "^7.0.0",
"terser": "^5.2.1"
"rollup": "^2.38.5",
"rollup-plugin-terser": "^7.0.2",
"terser": "^5.6.0-beta"
},

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