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

@intelligo.ai/object-to-schema

Package Overview
Dependencies
Maintainers
0
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intelligo.ai/object-to-schema - npm Package Compare versions

Comparing version 2.3.4 to 2.3.5

2

dist/utils/predefinedTransformations.d.ts

@@ -15,2 +15,3 @@ declare function fromTracerDate(tracerDate: number): string | undefined;

declare function convertFastCaseData(fastCaseDate: string): Promise<Date | undefined>;
declare function convertClearData(clearDate: string): Date | null | undefined;
export declare const strategies: {

@@ -38,2 +39,3 @@ predefinedTransformations: {

convertFastCaseData: typeof convertFastCaseData;
convertClearData: typeof convertClearData;
};

@@ -40,0 +42,0 @@ };

@@ -72,2 +72,18 @@ "use strict";

};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -335,2 +351,19 @@ exports.strategies = void 0;

}
function convertClearData(clearDate) {
if (!clearDate) {
return;
}
if (clearDate.includes(';')) {
var dates = clearDate.split(';');
if (dates.length === 1) {
return chrono.parseDate(dates[0]);
}
var _a = __read(dates
.map(function (date) { return date.trim(); })
.map(function (date) { return chrono.parseDate(date); })
.sort(function (a, b) { return a.getTime() - b.getTime(); }), 1), earlyDate = _a[0];
return earlyDate;
}
return chrono.parseDate(clearDate);
}
exports.strategies = {

@@ -357,5 +390,6 @@ predefinedTransformations: {

convertStringToDate: function (str) { return chrono.parseDate(str); },
convertFastCaseData: convertFastCaseData
convertFastCaseData: convertFastCaseData,
convertClearData: convertClearData
}
};
//# sourceMappingURL=predefinedTransformations.js.map

2

package.json
{
"name": "@intelligo.ai/object-to-schema",
"version": "2.3.4",
"version": "2.3.5",
"description": "",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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