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

@bbob/plugin-helper

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbob/plugin-helper - npm Package Compare versions

Comparing version 2.8.3 to 2.9.0

4

dist/index.js

@@ -18,4 +18,2 @@ (function (global, factory) {

const BACKSLASH = '\\';
const PLACEHOLDER_SPACE_TAB = ' ';
const PLACEHOLDER_SPACE = ' ';

@@ -156,4 +154,2 @@ const isTagNode = (el)=>typeof el === 'object' && !!el.tag;

exports.OPEN_BRAKET = OPEN_BRAKET;
exports.PLACEHOLDER_SPACE = PLACEHOLDER_SPACE;
exports.PLACEHOLDER_SPACE_TAB = PLACEHOLDER_SPACE_TAB;
exports.QUOTEMARK = QUOTEMARK;

@@ -160,0 +156,0 @@ exports.R = R;

2

dist/index.min.js

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).BbobPluginHelper={})}(this,function(t){"use strict";let e=t=>"object"==typeof t&&!!t.tag,r=t=>"string"==typeof t,n=(t,e,r)=>Object.keys(t).reduce(e,r),i=t=>e(t)?t.content.reduce((t,e)=>t+i(e),0):r(t)?t.length:0,o=(t,e)=>{t.content.push(e)},s=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/(javascript|data|vbscript):/gi,"$1%3A"),a=(t,e)=>{let r=typeof e,n={boolean:()=>e?""+t:"",number:()=>`${t}="${e}"`,string:()=>`${t}="${s(e)}"`,object:()=>`${t}="${s(JSON.stringify(e))}"`};return n[r]?n[r]():""},g=t=>null==t?"":n(t,(e,r)=>[...e,a(r,t[r])],[""]).join(" "),l=t=>n(t,(e,r)=>t[r]===r?t[r]:null,null),c=(t,e)=>{let r=l(e);if(r){let n=a(t,r),i={...e};delete i[r];let o=g(i);return`${n}${o}`}return`${t}${g(e)}`};class u{attr(t,e){return void 0!==e&&(this.attrs[t]=e),this.attrs[t]}append(t){return o(this,t)}get length(){return i(this)}toTagStart({openTag:t="[",closeTag:e="]"}={}){let r=c(this.tag,this.attrs);return`${t}${r}${e}`}toTagEnd({openTag:t="[",closeTag:e="]"}={}){return`${t}/${this.tag}${e}`}toTagNode(){return new u(this.tag.toLowerCase(),this.attrs,this.content)}toString({openTag:t="[",closeTag:e="]"}={}){let r=0===this.content.length,n=this.content.reduce((r,n)=>r+n.toString({openTag:t,closeTag:e}),""),i=this.toTagStart({openTag:t,closeTag:e});return r?i:`${i}${n}${this.toTagEnd({openTag:t,closeTag:e})}`}constructor(t,e,r){this.tag=t,this.attrs=e,this.content=Array.isArray(r)?r:[r]}}u.create=(t,e={},r=[])=>new u(t,e,r),u.isOf=(t,e)=>t.tag===e,t.BACKSLASH="\\",t.CLOSE_BRAKET="]",t.EQ="=",t.F="\f",t.N="\n",t.OPEN_BRAKET="[",t.PLACEHOLDER_SPACE=" ",t.PLACEHOLDER_SPACE_TAB=" ",t.QUOTEMARK='"',t.R="\r",t.SLASH="/",t.SPACE=" ",t.TAB=" ",t.TagNode=u,t.appendToNode=o,t.attrValue=a,t.attrsToString=g,t.escapeHTML=s,t.getNodeLength=i,t.getUniqAttr=l,t.isEOL=t=>"\n"===t,t.isStringNode=r,t.isTagNode=e});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).BbobPluginHelper={})}(this,function(t){"use strict";let e=t=>"object"==typeof t&&!!t.tag,r=t=>"string"==typeof t,n=(t,e,r)=>Object.keys(t).reduce(e,r),i=t=>e(t)?t.content.reduce((t,e)=>t+i(e),0):r(t)?t.length:0,o=(t,e)=>{t.content.push(e)},s=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/(javascript|data|vbscript):/gi,"$1%3A"),a=(t,e)=>{let r=typeof e,n={boolean:()=>e?""+t:"",number:()=>`${t}="${e}"`,string:()=>`${t}="${s(e)}"`,object:()=>`${t}="${s(JSON.stringify(e))}"`};return n[r]?n[r]():""},g=t=>null==t?"":n(t,(e,r)=>[...e,a(r,t[r])],[""]).join(" "),l=t=>n(t,(e,r)=>t[r]===r?t[r]:null,null),c=(t,e)=>{let r=l(e);if(r){let n=a(t,r),i={...e};delete i[r];let o=g(i);return`${n}${o}`}return`${t}${g(e)}`};class u{attr(t,e){return void 0!==e&&(this.attrs[t]=e),this.attrs[t]}append(t){return o(this,t)}get length(){return i(this)}toTagStart({openTag:t="[",closeTag:e="]"}={}){let r=c(this.tag,this.attrs);return`${t}${r}${e}`}toTagEnd({openTag:t="[",closeTag:e="]"}={}){return`${t}/${this.tag}${e}`}toTagNode(){return new u(this.tag.toLowerCase(),this.attrs,this.content)}toString({openTag:t="[",closeTag:e="]"}={}){let r=0===this.content.length,n=this.content.reduce((r,n)=>r+n.toString({openTag:t,closeTag:e}),""),i=this.toTagStart({openTag:t,closeTag:e});return r?i:`${i}${n}${this.toTagEnd({openTag:t,closeTag:e})}`}constructor(t,e,r){this.tag=t,this.attrs=e,this.content=Array.isArray(r)?r:[r]}}u.create=(t,e={},r=[])=>new u(t,e,r),u.isOf=(t,e)=>t.tag===e,t.BACKSLASH="\\",t.CLOSE_BRAKET="]",t.EQ="=",t.F="\f",t.N="\n",t.OPEN_BRAKET="[",t.QUOTEMARK='"',t.R="\r",t.SLASH="/",t.SPACE=" ",t.TAB=" ",t.TagNode=u,t.appendToNode=o,t.attrValue=a,t.attrsToString=g,t.escapeHTML=s,t.getNodeLength=i,t.getUniqAttr=l,t.isEOL=t=>"\n"===t,t.isStringNode=r,t.isTagNode=e});

@@ -12,5 +12,2 @@ const N = '\n';

const BACKSLASH = '\\';
const PLACEHOLDER_SPACE_TAB = ' ';
const PLACEHOLDER_SPACE = ' ';
// const getChar = String.fromCharCode;
export { N, F, R, TAB, EQ, QUOTEMARK, SPACE, OPEN_BRAKET, CLOSE_BRAKET, SLASH, PLACEHOLDER_SPACE_TAB, PLACEHOLDER_SPACE, BACKSLASH };
export { N, F, R, EQ, TAB, SPACE, SLASH, BACKSLASH, QUOTEMARK, OPEN_BRAKET, CLOSE_BRAKET };

@@ -21,14 +21,20 @@ "use strict";

},
EQ: function() {
return EQ;
},
TAB: function() {
return TAB;
},
EQ: function() {
return EQ;
SPACE: function() {
return SPACE;
},
SLASH: function() {
return SLASH;
},
BACKSLASH: function() {
return BACKSLASH;
},
QUOTEMARK: function() {
return QUOTEMARK;
},
SPACE: function() {
return SPACE;
},
OPEN_BRAKET: function() {

@@ -39,14 +45,2 @@ return OPEN_BRAKET;

return CLOSE_BRAKET;
},
SLASH: function() {
return SLASH;
},
PLACEHOLDER_SPACE_TAB: function() {
return PLACEHOLDER_SPACE_TAB;
},
PLACEHOLDER_SPACE: function() {
return PLACEHOLDER_SPACE;
},
BACKSLASH: function() {
return BACKSLASH;
}

@@ -65,3 +59,1 @@ });

var BACKSLASH = "\\";
var PLACEHOLDER_SPACE_TAB = " ";
var PLACEHOLDER_SPACE = " ";
{
"name": "@bbob/plugin-helper",
"version": "2.8.3",
"version": "2.9.0",
"description": "Set of utils to help write plugins for @bbob/core",

@@ -57,3 +57,3 @@ "keywords": [

],
"gitHead": "0d9da27af8810756cac3a59dae421a19e7848cc7"
"gitHead": "e5c741cb9a771ae5a7247ab73c2a2f90b8d83b28"
}

@@ -16,7 +16,2 @@ const N = '\n';

const PLACEHOLDER_SPACE_TAB = ' ';
const PLACEHOLDER_SPACE = ' ';
// const getChar = String.fromCharCode;
export {

@@ -26,12 +21,10 @@ N,

R,
EQ,
TAB,
EQ,
SPACE,
SLASH,
BACKSLASH,
QUOTEMARK,
SPACE,
OPEN_BRAKET,
CLOSE_BRAKET,
SLASH,
PLACEHOLDER_SPACE_TAB,
PLACEHOLDER_SPACE,
BACKSLASH,
};
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