json-schema-to-flow-type
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -71,3 +71,7 @@ 'use strict'; | ||
if (flowSchema.$flowType === 'null') { | ||
return t.nullLiteralTypeAnnotation(); | ||
} | ||
return t.createTypeAnnotationBasedOnTypeof(flowSchema.$flowType); | ||
}; |
@@ -10,2 +10,4 @@ 'use strict'; | ||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
var _lodash = require('lodash'); | ||
@@ -22,4 +24,9 @@ | ||
if (_lodash2.default.isString(ref)) { | ||
const [importRef, keyPath] = _lodash2.default.split(ref, '#'); | ||
var _$split = _lodash2.default.split(ref, '#'), | ||
_$split2 = _slicedToArray(_$split, 2); | ||
const importRef = _$split2[0], | ||
keyPath = _$split2[1]; | ||
const keyPathArr = _lodash2.default.drop(_lodash2.default.split(keyPath, '/')); | ||
@@ -26,0 +33,0 @@ |
{ | ||
"name": "json-schema-to-flow-type", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"ava": { | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14572
235
0