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

idea-toolbox

Package Overview
Dependencies
Maintainers
2
Versions
377
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idea-toolbox - npm Package Compare versions

Comparing version 7.0.1 to 7.0.2

8

dist/src/customSectionMeta.model.js

@@ -19,6 +19,6 @@ "use strict";

this.fields = {};
x.fields = x.fields || {};
x.fields = x.fields ?? {};
this.fieldsLegend.forEach(f => (this.fields[f] = new customFieldMeta_model_1.CustomFieldMeta(x.fields[f], languages)));
if (x.displayTemplate)
this.displayTemplate = (x.displayTemplate || []).map((z) => this.cleanArray(z, String)
this.displayTemplate = (x.displayTemplate ?? []).map((z) => this.cleanArray(z, String)
// filter out of the displayTemplate the fields which aren't in the fieldsLegend

@@ -47,3 +47,3 @@ .filter(dpf => this.fieldsLegend.some(f => f === dpf)));

const fields = {};
newFields = newFields || {};
newFields = newFields ?? {};
this.fieldsLegend.forEach(f => (fields[f] = this.fields[f].loadField(newFields[f])));

@@ -56,3 +56,3 @@ return fields;

validateFields(fields) {
fields = fields || {};
fields = fields ?? {};
const e = new Array();

@@ -59,0 +59,0 @@ this.fieldsLegend.forEach(f => (!this.fields[f].validateField(fields[f]) ? e.push(f) : null));

@@ -9,3 +9,2 @@ import { Resource } from './resource.model';

* Indexes:
* @todo in fhe future exclude `storeReceipt` from the indexes where not used (heavy string).
* - `project-validUntil-index` (LSI - all).

@@ -12,0 +11,0 @@ * - `project-planId-index` (LSI - all).

@@ -10,3 +10,2 @@ "use strict";

* Indexes:
* @todo in fhe future exclude `storeReceipt` from the indexes where not used (heavy string).
* - `project-validUntil-index` (LSI - all).

@@ -13,0 +12,0 @@ * - `project-planId-index` (LSI - all).

@@ -110,3 +110,7 @@ "use strict";

else
return origin || origin === 0 ? castFunction(origin) : defaultVal !== undefined ? defaultVal : null;
return origin || origin === 0 || origin === false
? castFunction(origin)
: defaultVal !== undefined
? defaultVal
: null;
}

@@ -121,7 +125,7 @@ /**

cleanArray(origin, castFunction, defaultVal) {
return (origin || [])
.map(x => (x || x === 0 ? castFunction(x) : defaultVal !== undefined ? defaultVal : null))
.filter(x => x || x === 0);
return (origin ?? [])
.map(x => (x || x === 0 || x === false ? castFunction(x) : defaultVal !== undefined ? defaultVal : null))
.filter(x => x || x === 0 || x === false);
}
}
exports.Resource = Resource;

@@ -25,6 +25,2 @@ import { Resource } from './resource.model';

createdAt: epochDateTime;
/**
* @deprecated
*/
currentTeam: any;
load(x: any): void;

@@ -31,0 +27,0 @@ safeLoad(newData: any, safeData: any): void;

@@ -19,5 +19,2 @@ "use strict";

this.createdAt = this.clean(x.createdAt, d => new Date(d).getTime(), Date.now());
// @todo kept for retrocompatibility before `IDEA Ionic Extra v5.15.x` #22 (only Mario is missing)
// --> when all the projects are advanced to that version, you can remove this attribute
this.currentTeam = {};
}

@@ -30,5 +27,2 @@ safeLoad(newData, safeData) {

this.createdAt = safeData.createdAt;
// @todo kept for retrocompatibility before `IDEA Ionic Extra v5.15.x` #22 (only Mario is missing)
// --> when all the projects are advanced to that version, you can remove this attribute
this.currentTeam = {};
}

@@ -35,0 +29,0 @@ /**

@@ -34,3 +34,3 @@ import { markdown } from './markdown';

export declare const isEmpty: (field: any, fieldType?: isEmptyFieldTypes) => boolean;
export type isEmptyFieldTypes = 'string' | 'number' | 'boolean' | 'object' | 'date' | 'email' | 'phone' | 'url' | 'domain';
export type isEmptyFieldTypes = 'string' | 'number' | 'positiveNumber' | 'boolean' | 'object' | 'date' | 'email' | 'phone' | 'url' | 'domain';
/**

@@ -37,0 +37,0 @@ * Convert a markdown string to HTML.

@@ -7,7 +7,7 @@ "use strict";

exports.loopNumericEnumValues = exports.loopNumericEnumKeys = exports.getStringEnumKeyByValue = exports.loopStringEnumValues = exports.loopStringEnumKeys = exports.mdToHtml = exports.isEmpty = exports.joinArraysOnKeys = exports.cleanStr = exports.toISODate = void 0;
const isEmail_1 = __importDefault(require("validator/lib/isEmail"));
const isMobilePhone_1 = __importDefault(require("validator/lib/isMobilePhone"));
const isURL_1 = __importDefault(require("validator/lib/isURL"));
const isFQDN_1 = __importDefault(require("validator/lib/isFQDN"));
const isDate_1 = __importDefault(require("validator/lib/isDate"));
const isEmail_1 = __importDefault(require("validator/es/lib/isEmail"));
const isMobilePhone_1 = __importDefault(require("validator/es/lib/isMobilePhone"));
const isURL_1 = __importDefault(require("validator/es/lib/isURL"));
const isFQDN_1 = __importDefault(require("validator/es/lib/isFQDN"));
const isDate_1 = __importDefault(require("validator/es/lib/isDate"));
const marked_1 = require("marked");

@@ -79,2 +79,4 @@ //

return field === 0;
case 'positiveNumber':
return field <= 0;
case 'boolean':

@@ -81,0 +83,0 @@ return !field;

{
"name": "idea-toolbox",
"version": "7.0.1",
"version": "7.0.2",
"description": "IDEA's utility functions",

@@ -30,10 +30,9 @@ "main": "dist/index.js",

"dependencies": {
"marked": "^4.0.18",
"validator": "^13.7.0"
"marked": "^11.1.1",
"validator": "^13.11.0"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.0",
"@types/marked": "^4.0.3",
"@types/node": "^18.17.4",
"@types/validator": "^13.7.4",
"@types/validator": "^13.11.8",
"@typescript-eslint/eslint-plugin": "^5.47.0",

@@ -40,0 +39,0 @@ "@typescript-eslint/parser": "^5.47.0",

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