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

ask-json

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ask-json - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

2

dist/cli.js

@@ -14,3 +14,3 @@ #!/usr/bin/env node

var name = "ask-json";
var version = "0.1.7";
var version = "0.1.8";

@@ -17,0 +17,0 @@ var ensureFile = (filePath) => {

@@ -9,6 +9,7 @@ 'use strict';

var get = _interopDefault(require('lodash/get'));
var isFunction = _interopDefault(require('lodash/isFunction'));
var isString = _interopDefault(require('lodash/isString'));
var prompts = _interopDefault(require('prompts'));
var range = _interopDefault(require('lodash/range'));
var traverseSchema = _interopDefault(require('json-schema-traverse'));
var isFunction = _interopDefault(require('lodash/isFunction'));
var set = _interopDefault(require('lodash/set'));

@@ -57,2 +58,8 @@ var isEqual = _interopDefault(require('lodash/isEqual'));

const getMessage = (customMessage, dataPath) => {
if (isFunction(customMessage)) return customMessage(dataPath, get(this.data, dataPath, []));
if (isString(customMessage)) return chalkTemplate(chalk, customMessage);
return chalk`Would you like to add an item to {green ${dataPath}}?`;
};
traverseSchema(this.schema, { cb: findArrays });

@@ -68,3 +75,3 @@

name: 'value',
message: customMessage ? chalkTemplate(chalk, customMessage) : chalk`Would you like to add an item to {green ${dataPath}}?`,
message: getMessage(customMessage, dataPath),
initial: false,

@@ -71,0 +78,0 @@ });

{
"name": "ask-json",
"description": "Easy interactive prompts to create and validate data using JSON schema",
"version": "0.1.7",
"version": "0.1.8",
"author": "Jon McClure <jon.r.mcclure@gmail.com>",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/reuters-graphics/ask-json",

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