Socket
Socket
Sign inDemoInstall

@babel/helper-validator-option

Package Overview
Dependencies
0
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.21.4-esm to 7.21.4-esm.1

8

lib/find-suggestion.js

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

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.findSuggestion = findSuggestion;
const {

@@ -34,3 +28,3 @@ min

}
function findSuggestion(str, arr) {
export function findSuggestion(str, arr) {
const distances = arr.map(el => levenshtein(el, str));

@@ -37,0 +31,0 @@ return arr[distances.indexOf(min(...distances))];

@@ -1,21 +0,4 @@

"use strict";
export { OptionValidator } from "./validator.js";
export { findSuggestion } from "./find-suggestion.js";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "OptionValidator", {
enumerable: true,
get: function () {
return _validator.OptionValidator;
}
});
Object.defineProperty(exports, "findSuggestion", {
enumerable: true,
get: function () {
return _findSuggestion.findSuggestion;
}
});
var _validator = require("./validator");
var _findSuggestion = require("./find-suggestion");
//# sourceMappingURL=index.js.map

13

lib/validator.js

@@ -1,9 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.OptionValidator = void 0;
var _findSuggestion = require("./find-suggestion");
class OptionValidator {
import { findSuggestion } from "./find-suggestion.js";
export class OptionValidator {
constructor(descriptor) {

@@ -17,3 +11,3 @@ this.descriptor = descriptor;

throw new Error(this.formatMessage(`'${option}' is not a valid top-level option.
- Did you mean '${(0, _findSuggestion.findSuggestion)(option, validOptionNames)}'?`));
- Did you mean '${findSuggestion(option, validOptionNames)}'?`));
}

@@ -47,4 +41,3 @@ }

}
exports.OptionValidator = OptionValidator;
//# sourceMappingURL=validator.js.map
{
"name": "@babel/helper-validator-option",
"version": "7.21.4-esm",
"version": "7.21.4-esm.1",
"description": "Validate plugin/preset options",

@@ -23,3 +23,3 @@ "repository": {

"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
"type": "module"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc