| window.h=function(n,...a){var i="";for(let r=0;r<n.length;r++){var l=n[r],o=a[r];i+=""+l+(null==(o=Array.isArray(o)?o.join(""):o)?"":o)}return i}; |
| window.h = function h(strings, ...keys) { | ||
| var s = '' | ||
| for (let i = 0; i < strings.length; i++) { | ||
| var text = strings[i] | ||
| var val = keys[i] | ||
| if (Array.isArray(val)) { | ||
| val = val.join('') | ||
| } | ||
| s += `${text}${val == null ? '' : val}` | ||
| } | ||
| return s | ||
| } |
+1
-1
| { | ||
| "name": "htmlview", | ||
| "version": "0.7.1", | ||
| "version": "0.7.2", | ||
| "description": "HTML view template string function", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
| #!/usr/bin/env node | ||
| const fs = require('fs') | ||
| const uglify = require('uglify-js') | ||
| const htmlview = require('../index.js') | ||
| const code = `window.h = ${htmlview.toString()}\n` | ||
| if (!fs.existsSync('./dist')) { | ||
| fs.mkdirSync('./dist') | ||
| } | ||
| fs.writeFileSync('./dist/htmlview.js', code) | ||
| const result = uglify.minify(code) | ||
| fs.writeFileSync('./dist/htmlview-min.js', result.code) |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
3283
1.39%6
20%24
4.35%0
-100%