New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

skydiet-lib-node

Package Overview
Dependencies
Maintainers
0
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skydiet-lib-node - npm Package Compare versions

Comparing version 1.0.23 to 1.0.24

28

dist/index.js

@@ -8,5 +8,5 @@ "use strict";

/* eslint-disable @typescript-eslint/no-unused-vars */
const c2_util_front_1 = require("c2-util-front");
const moment_1 = __importDefault(require("moment"));
const const_1 = require("./const");
const c2_util_front_1 = require("c2-util-front");
const IQuestion_1 = require("./models/IQuestion");

@@ -111,2 +111,23 @@ const processAnswer = (options) => {

});
groupeds.forEach((group) => {
group.items.forEach((item) => {
item.childs?.sort((a, b) => {
for (const fieldOrder of internalOrders.fields) {
if (internalOrders.sense === "asc") {
if (a[fieldOrder] < b[fieldOrder])
return -1;
if (a[fieldOrder] > b[fieldOrder])
return 1;
}
else {
if (a[fieldOrder] > b[fieldOrder])
return -1;
if (a[fieldOrder] < b[fieldOrder])
return 1;
}
}
return 0; // Se ambos
});
});
});
return groupeds;

@@ -182,7 +203,5 @@ };

if ((0, c2_util_front_1.isEmpty)(answer) || (question.typeAnswer === IQuestion_1.TYPE_ANSWER.OPEN_NUMBER && isNaN(answer))) {
console.log("### nao respondeu", question._id);
continue;
}
console.log("## respondeu", question._id);
unansereds = unansereds.filter((q) => q._id !== question._id);
unansereds = unansereds.filter((q) => q._id === question._id);
answereds.push(question);

@@ -201,3 +220,2 @@ answereds = [...answereds, ...checkUnanswereds(unansereds)];

let questionsRelationedsUnaswered = [];
console.log("relaion");
for (const question of questionsRelationeds) {

@@ -204,0 +222,0 @@ if ((0, c2_util_front_1.isEmpty)(question.formula)) {

2

package.json
{
"name": "skydiet-lib-node",
"version": "1.0.23",
"version": "1.0.24",
"description": "Biblioteca para funções skydiet",

@@ -5,0 +5,0 @@ "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",

/* eslint-disable @typescript-eslint/no-unused-vars */
import { isEmpty, isNotEmpty } from "c2-util-front";
import moment from "moment";
import { MET_ACTIVITIES } from "./const";
import { isEmpty, isNotEmpty } from "c2-util-front";
import { IAdminMet } from "./models/IAdminMet";

@@ -10,3 +10,3 @@ import { IAttendanceMetActivity } from "./models/IAttendanceMetActivity";

import { IPatient } from "./models/IPatient";
import { IQuestionOptions, TYPE_ANSWER } from "./models/IQuestion";
import { TYPE_ANSWER, IQuestionOptions } from "./models/IQuestion";

@@ -129,2 +129,22 @@

groupeds.forEach((group: any) => {
group.items.forEach((item: any) => {
item.childs?.sort((a: any, b: any) => {
for (const fieldOrder of internalOrders.fields) {
if (internalOrders.sense === "asc") {
if (a[fieldOrder] < b[fieldOrder]) return -1;
if (a[fieldOrder] > b[fieldOrder]) return 1;
} else {
if (a[fieldOrder] > b[fieldOrder]) return -1;
if (a[fieldOrder] < b[fieldOrder]) return 1;
}
}
return 0; // Se ambos
});
})
})
return groupeds

@@ -220,7 +240,6 @@ }

if (isEmpty(answer) || (question.typeAnswer === TYPE_ANSWER.OPEN_NUMBER && isNaN(answer))) {
console.log("### nao respondeu", question._id)
continue
}
console.log("## respondeu", question._id)
unansereds = unansereds.filter((q: IAttendanceQuestion) => q._id !== question._id)
unansereds = unansereds.filter((q: IAttendanceQuestion) => q._id === question._id)
answereds.push(question)

@@ -245,3 +264,2 @@ answereds = [...answereds, ...checkUnanswereds(unansereds)]

let questionsRelationedsUnaswered: IAttendanceQuestion[] = []
console.log("relaion")
for (const question of questionsRelationeds) {

@@ -300,3 +318,3 @@ if (isEmpty(question.formula)) {

const matches = formula.match(/\$\{([^}]+)\}/g) ?? []; // padrao regex: ${ANYTHING}
const variables = [...new Set(matches) as any];
const variables = [...new Set(matches)];

@@ -327,3 +345,3 @@ for (const variable of variables) {

const matches = formula.match(/\$\{([^}]+)\}/g) ?? []; // padrao regex: ${ANYTHING}
const variables = [...new Set(matches) as any];
const variables = [...new Set(matches)];

@@ -330,0 +348,0 @@ for (const variable of variables) {

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