Socket
Socket
Sign inDemoInstall

concise-flow

Package Overview
Dependencies
5
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

9

lib/index.js

@@ -46,3 +46,3 @@ 'use strict';

var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(schema, options, utils) {
var preprocessedSchema, raw;
var raw;
return _regenerator2.default.wrap(function _callee$(_context) {

@@ -52,4 +52,3 @@ while (1) {

case 0:
preprocessedSchema = utils.preprocess(schema);
raw = writeTypes(preprocessedSchema);
raw = writeTypes(utils.preprocessedSchema);

@@ -59,3 +58,3 @@ if (options.file) _fs2.default.writeFileSync(options.file, raw, 'utf8');

case 4:
case 3:
case 'end':

@@ -109,3 +108,3 @@ return _context.stop();

var writeField = function writeField(name, specs) {
var isRequired = specs.validations && specs.validations.isRequired ? '' : '?';
var isRequired = specs.isRequired ? '' : '?';
var typeStr = writeFieldType(specs.type);

@@ -112,0 +111,0 @@ if (specs.isPlural) typeStr = 'Array<' + typeStr + '>';

{
"name": "concise-flow",
"version": "0.1.0",
"version": "0.2.0",
"author": "Guillermo Grau Panea",

@@ -17,3 +17,3 @@ "license": "MIT",

"lodash.upperfirst": "4.3.1",
"concise-types": "^0.0.0"
"concise-types": "*"
},

@@ -20,0 +20,0 @@ "description": "A tool belt for concise schemas",

@@ -26,4 +26,3 @@ // @flow

) => {
const preprocessedSchema = utils.preprocess(schema);
const raw = writeTypes(preprocessedSchema);
const raw = writeTypes(utils.preprocessedSchema);
if (options.file) fs.writeFileSync(options.file, raw, 'utf8');

@@ -70,3 +69,3 @@ return raw;

const writeField = (name, specs: any) => {
const isRequired = specs.validations && specs.validations.isRequired ? '' : '?';
const isRequired = specs.isRequired ? '' : '?';
let typeStr = writeFieldType(specs.type);

@@ -73,0 +72,0 @@ if (specs.isPlural) typeStr = `Array<${typeStr}>`;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc