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

@xiee/utils

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xiee/utils - npm Package Compare versions

Comparing version 1.2.14 to 1.3.0

css/article.css

12

js/key-buttons.js

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

(function(d) {
(d => {
const a1 = ['Enter', 'Up', 'Down', 'Left', 'Right'];
const a2 = ['↵', '↑', '↓', '←', '→'];
function drawArrows(x) {
a1.map((v, i) => x = x.replace(new RegExp('>' + v + '<', 'g'), ' title="' + v + (i ? ' Arrow' : '') + '">' + a2[i] + '<'));
a1.map((v, i) => x = x.replace(new RegExp(`>${v}<`, 'g'), ` title="${v + (i ? ' Arrow' : '')}">${a2[i]}<`));
return x;

@@ -13,5 +13,5 @@ }

k3 = '[a-zA-Z0-9]|Click',
r1 = new RegExp('^(' + k1 + '|' + k2 + ')$'),
r2 = new RegExp('^(' + k2 + ') [/+] '),
r3 = new RegExp('^(' + [k1, k2, k3].join('|') + ')( [/+] )(.*)');
r1 = new RegExp(`^(${k1}|${k2})$`),
r2 = new RegExp(`^(${k2}) [/+] `),
r3 = new RegExp(`^(${k1}|${k2}|${k3})( [/+] )(.*)`);
d.querySelectorAll(':not(pre) > code').forEach(el => {

@@ -21,3 +21,3 @@ if (el.childElementCount > 0) return;

if (r1.test(t)) {
el.outerHTML = drawArrows('<kbd>' + t + '</kbd>');
el.outerHTML = drawArrows(`<kbd>${t}</kbd>`);
return;

@@ -24,0 +24,0 @@ }

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

!function(e){const r=["Enter","Up","Down","Left","Right"],t=["&crarr;","&uarr;","&darr;","&larr;","&rarr;"];function n(e){return r.map(((r,n)=>e=e.replace(new RegExp(">"+r+"<","g"),' title="'+r+(n?" Arrow":"")+'">'+t[n]+"<"))),e}const o="Esc|Tab|PageUp|PageDown|Space|Delete|Home|End|PrtScr?|PrintScreen|"+Array(12).fill().map(((e,r)=>"F"+(r+1))).concat(r).join("|"),c="Ctrl|Control|Shift|Alt|Cmd|Command|fn",a=new RegExp("^("+o+"|"+c+")$"),l=new RegExp("^("+c+") [/+] "),i=new RegExp("^("+[o,c,"[a-zA-Z0-9]|Click"].join("|")+")( [/+] )(.*)");e.querySelectorAll(":not(pre) > code").forEach((e=>{if(e.childElementCount>0)return;let r=e.innerText;if(a.test(r))return void(e.outerHTML=n("<kbd>"+r+"</kbd>"));if(!l.test(r))return;let t="";for(r+=" + ";i.test(r);)t+=r.replace(i,"<kbd>$1</kbd>$2"),r=r.replace(i,"$3");""===r&&(e.outerHTML=n(t.replace(/ \+ $/,"")))}))}(document);
(e=>{const r=["Enter","Up","Down","Left","Right"],t=["&crarr;","&uarr;","&darr;","&larr;","&rarr;"];function n(e){return r.map(((r,n)=>e=e.replace(new RegExp(`>${r}<`,"g"),` title="${r+(n?" Arrow":"")}">${t[n]}<`))),e}const o="Esc|Tab|PageUp|PageDown|Space|Delete|Home|End|PrtScr?|PrintScreen|"+Array(12).fill().map(((e,r)=>"F"+(r+1))).concat(r).join("|"),a="Ctrl|Control|Shift|Alt|Cmd|Command|fn",c=new RegExp(`^(${o}|${a})$`),l=new RegExp(`^(${a}) [/+] `),i=new RegExp(`^(${o}|${a}|[a-zA-Z0-9]|Click)( [/+] )(.*)`);e.querySelectorAll(":not(pre) > code").forEach((e=>{if(e.childElementCount>0)return;let r=e.innerText;if(c.test(r))return void(e.outerHTML=n(`<kbd>${r}</kbd>`));if(!l.test(r))return;let t="";for(r+=" + ";i.test(r);)t+=r.replace(i,"<kbd>$1</kbd>$2"),r=r.replace(i,"$3");""===r&&(e.outerHTML=n(t.replace(/ \+ $/,"")))}))})(document);
// right-align a quote footer if it starts with ---
[...document.getElementsByTagName('blockquote')].forEach(quote => {
const el = quote.lastElementChild;
if (el?.tagName === 'P' && /^—/.test(el.textContent)) el.style.textAlign = 'right';
if (el?.tagName === 'P' && /^(—|---)/.test(el.textContent)) el.style.textAlign = 'right';
});

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

[...document.getElementsByTagName("blockquote")].forEach((t=>{const e=t.lastElementChild;"P"===e?.tagName&&/^—/.test(e.textContent)&&(e.style.textAlign="right")}));
[...document.getElementsByTagName("blockquote")].forEach((t=>{const e=t.lastElementChild;"P"===e?.tagName&&/^(—|---)/.test(e.textContent)&&(e.style.textAlign="right")}));
{
"name": "@xiee/utils",
"version": "1.2.14",
"version": "1.3.0",
"description": "Miscellaneous tools and utilities to manipulate HTML pages",

@@ -5,0 +5,0 @@ "scripts": {

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