command-line-usage
Advanced tools
Comparing version 5.0.3 to 5.0.4
const chalk = require('chalk') | ||
function format (str) { | ||
return chalk(Object.assign([], { raw: [ str ] })) | ||
} | ||
function chalkFormat (str) { | ||
str = str.replace(/`/g, '\\`') | ||
const format = new Function('chalk', `'use strict'; return chalk\`${str}\``) | ||
return format(chalk) | ||
return format(str) | ||
} | ||
module.exports = chalkFormat |
{ | ||
"name": "command-line-usage", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"description": "Generates command-line usage information", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/command-line-usage.git", |
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
318
0
25888