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

@asyncapi/generator

Package Overview
Dependencies
Maintainers
3
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/generator - npm Package Compare versions

Comparing version 0.51.0 to 0.51.1

12

lib/templateConfigValidator.js

@@ -68,5 +68,13 @@ const semver = require('semver');

function provideAdvice(wrongParams, configParams) {
const suggestion = (p) => {
const sortInt = (a, b) => {
return a[0] - b[0];
};
const arr = Object.keys(configParams).map(param => [levenshtein(p, param), param]);
return arr.sort(sortInt)[0][1];
};
if (configParams) {
wrongParams.forEach(wp => console.warn(`Did you mean "${Object.keys(configParams)
.map(param => [levenshtein(wp, param), param]).sort()[0][1]}"?`));
wrongParams.forEach(wp => console.warn(`Did you mean "${suggestion(wp)}"?`));
} else {

@@ -73,0 +81,0 @@ console.warn('This template doesn\'t have any params!');

2

package.json
{
"name": "@asyncapi/generator",
"version": "0.51.0",
"version": "0.51.1",
"description": "The AsyncAPI generator. It can generate documentation, code, anything!",

@@ -5,0 +5,0 @@ "main": "./lib/generator.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