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

@hestia-earth/schema-convert

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hestia-earth/schema-convert - npm Package Compare versions

Comparing version 7.8.0 to 7.9.0

34

json.js

@@ -154,4 +154,5 @@ "use strict";

};
var schemaNotFoundError = function () { return exports.throwCSVError({
message: 'schema-not-found'
var schemaNotFoundError = function (schema) { return exports.throwCSVError({
message: 'schema-not-found',
schema: schema
}); };

@@ -223,3 +224,11 @@ var propertyNotFoundError = function (schema, key, value) { return exports.throwCSVError({

integer: function (value) { return isEmptyCell(value) ? undefined : +value; },
boolean: function (value) { return isEmptyCell(value) ? undefined : value.toLowerCase() === 'true'; },
boolean: function (value) {
return isEmptyCell(value) ?
undefined :
utils_1.isBoolean(value) ?
value.toLowerCase() === 'true' :
(function () {
throw new Error('failed to parse boolean, expected true or false');
})();
},
object: function (value, schemas, _a, _i) {

@@ -330,3 +339,3 @@ var $ref = _a.$ref, required = _a.required;

if (top === void 0) { top = false; }
var schema = type in schemas ? schemas[type] : schemaNotFoundError();
var schema = type in schemas ? schemas[type] : schemaNotFoundError(type);
var content = mapContent(schemas, schema, ignoreInternal)(data);

@@ -353,7 +362,12 @@ return utils_1.reduceUndefinedValues(__assign({ id: isEmptyCell(data.id) ? undefined : data.id }, extendDataFromSchema(content, schema, type, ignoreInternal, top)), true);

*/
exports.toJson = function (schemas, content) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, csvtojson({ delimiter: 'auto' }).fromString(content)];
case 1: return [2 /*return*/, (_a.sent()).flatMap(convetToNode(schemas))];
}
}); }); };
exports.toJson = function (schemas, content) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, csvtojson({
delimiter: 'auto',
ignoreColumns: /^$/
}).fromString(content)];
case 1: return [2 /*return*/, (_a.sent()).flatMap(convetToNode(schemas))];
}
});
}); };
{
"name": "@hestia-earth/schema-convert",
"version": "7.8.0",
"version": "7.9.0",
"description": "Hestia Schema Converters",

@@ -5,0 +5,0 @@ "main": "index.js",

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