New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mhr

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mhr - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

30

cli.js
#!/usr/bin/env node
const cwd = require(`cwd`);
const ora = require(`ora`);
const fs = require(`fs`);
const cwd = require('cwd');
const ora = require('ora');
const fs = require('fs');
const rowTemplate = (name, option) => `
const rowTemplate = (name, param) => `
<tr>
<td>${name}</td>
<td>${option.type}</td>
<td>${option.default}</td>
<td>${typeof option.default === `boolean` ? `true or false` :
option.range instanceof Array ? `From ${option.range[0]} to ${option.range[1]}` :
option.range || ``}</td>
<td>${option.description || ``}</td>
<th>${name}</th>
<th>${param.type}</th>
<th>${param.default}</th>
<th>${typeof param.default === 'boolean' ? 'true or false' :
param.range instanceof Array ? `From ${param.range[0]} to ${param.range[1]}` :
param.range || ''}</th>
<th>${param.description || ''}</th>
</tr>`;

@@ -29,10 +29,10 @@

</thead>
<tbody>${Object.keys(params).map(name => rowTemplate(name, params[name])).join(``)}</tbody>
<tbody>${Object.keys(params).map(name => rowTemplate(name, params[name])).join('')}</tbody>
</table>
`;
const creative = JSON.parse(fs.readFileSync(cwd(`./creative.json`)));
const creative = JSON.parse(fs.readFileSync(cwd('./creative.json')));
const utils = {
getAdParameters(params) {
fs.writeFile(cwd(`README.md`), template(params), () => ora(`README.md created`).succeed());
fs.writeFile(cwd('README.md'), template(params), () => ora('README.md created').succeed());
return params;

@@ -42,2 +42,2 @@ }

eval(fs.readFileSync(cwd(`./js/params.js`)).toString(`utf8`).replace(/export default |export /, ``));
eval(fs.readFileSync(cwd('./js/params.js')).toString('utf8').replace(/export default |export /, ''));
{
"name": "mhr",
"description": "The util creates readme for creative",
"version": "0.2.2",
"version": "0.2.3",
"bin": {

@@ -6,0 +6,0 @@ "mhr": "cli.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