Socket
Socket
Sign inDemoInstall

inquirer

Package Overview
Dependencies
Maintainers
0
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer - npm Package Compare versions

Comparing version 9.3.0 to 9.3.1

29

lib/ui/prompt.js

@@ -1,8 +0,27 @@

import get from 'lodash.get';
import set from 'lodash.set';
const _ = {
set: (obj, path = '', value) => {
let pointer = obj;
path.split('.').forEach((key, index, arr) => {
if (key === '__proto__' || key === 'constructor') return;
const _ = {
set,
get,
if (index === arr.length - 1) {
pointer[key] = value;
} else if (!(key in pointer)) {
pointer[key] = {};
}
pointer = pointer[key];
});
},
get: (obj, path = '', defaultValue) => {
const travel = (regexp) =>
String.prototype.split
.call(path, regexp)
.filter(Boolean)
.reduce((res, key) => (res !== null && res !== undefined ? res[key] : res), obj);
const result = travel(/[,[\]]+?/) || travel(/[,.[\]]+?/);
return result === undefined || result === obj ? defaultValue : result;
},
};
import {

@@ -9,0 +28,0 @@ defer,

6

package.json
{
"name": "inquirer",
"type": "module",
"version": "9.3.0",
"version": "9.3.1",
"description": "A collection of common interactive command line user interfaces.",

@@ -66,4 +66,2 @@ "author": "Simon Boudrias <admin@simonboudrias.com>",

"external-editor": "^3.1.0",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"mute-stream": "1.0.0",

@@ -80,3 +78,3 @@ "ora": "^5.4.1",

"sideEffects": false,
"gitHead": "d5f62c6ee3e671f7d1b776b85d43781869d70918"
"gitHead": "88696949e4646034cde7b85d57df0c211a5a492f"
}
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