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
51
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.15 to 1.0.16

19

dist/index.js

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

const childsDisableds = getChildsDisableds(questionsChilds, questionsAnswereds, options.bankQuestions);
const questionsAutoAnswereds = getQuestionsAutoAnswereds(question.codeAnswer, questionsAnswereds, options.bankQuestions, options.attendanceMetActivities ?? []);
let currentAttendenceQuestionsNew = options.currentAttendenceQuestions.filter((q) => !childsDisableds.map((disabled) => disabled._id).includes(q._id));

@@ -34,13 +35,9 @@ currentAttendenceQuestionsNew = [...currentAttendenceQuestionsNew, ...childsReleaseds];

}
let questionsAutoAnswereds = [];
if (options.disableAutoAnswers === false) {
questionsAutoAnswereds = getQuestionsAutoAnswereds(question.codeAnswer, questionsAnswereds, options.bankQuestions, options.attendanceMetActivities ?? []);
currentAttendenceQuestionsNew.forEach((aq) => {
const autoAnswered = questionsAutoAnswereds.find((aaq) => aaq._id === aq._id);
if (autoAnswered) {
aq.answer = autoAnswered.answer ?? aq.defaultAnswer;
}
});
}
return { questions: currentAttendenceQuestionsNew, autoAnswers: questionsAutoAnswereds };
currentAttendenceQuestionsNew.forEach((aq) => {
const autoAnswered = questionsAutoAnswereds.find((aaq) => aaq._id === aq._id);
if (autoAnswered) {
aq.answer = autoAnswered.answer ?? aq.defaultAnswer;
}
});
return { questions: currentAttendenceQuestionsNew, autoAnswers: options.disableAutoAnswers ? [] : questionsAutoAnswereds };
};

@@ -47,0 +44,0 @@ exports.processAnswer = processAnswer;

{
"name": "skydiet-lib-node",
"version": "1.0.15",
"version": "1.0.16",
"description": "Biblioteca para funções skydiet",

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

@@ -35,9 +35,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */

const childsDisableds = getChildsDisableds(questionsChilds, questionsAnswereds, options.bankQuestions)
const questionsAutoAnswereds = getQuestionsAutoAnswereds(question.codeAnswer, questionsAnswereds, options.bankQuestions, options.attendanceMetActivities ?? [])
let currentAttendenceQuestionsNew = options.currentAttendenceQuestions.filter((q: IAttendanceQuestion) => !childsDisableds.map((disabled: IAttendanceQuestion) => disabled._id).includes(q._id));
currentAttendenceQuestionsNew = [...currentAttendenceQuestionsNew, ...childsReleaseds]
const currentQuestionNew = currentAttendenceQuestionsNew.find((q: IAttendanceQuestion) => q._id === options.currentQuestion._id)

@@ -47,16 +45,11 @@ if (currentQuestionNew) {

}
let questionsAutoAnswereds: IAttendanceQuestion[] = []
if (options.disableAutoAnswers === false) {
questionsAutoAnswereds = getQuestionsAutoAnswereds(question.codeAnswer, questionsAnswereds, options.bankQuestions, options.attendanceMetActivities ?? [])
currentAttendenceQuestionsNew.forEach((aq: IAttendanceQuestion) => {
const autoAnswered = questionsAutoAnswereds.find((aaq: IAttendanceQuestion) => aaq._id === aq._id)
if (autoAnswered) {
aq.answer = autoAnswered.answer ?? aq.defaultAnswer
}
})
}
return { questions: currentAttendenceQuestionsNew, autoAnswers: questionsAutoAnswereds }
currentAttendenceQuestionsNew.forEach((aq: IAttendanceQuestion) => {
const autoAnswered = questionsAutoAnswereds.find((aaq: IAttendanceQuestion) => aaq._id === aq._id)
if (autoAnswered) {
aq.answer = autoAnswered.answer ?? aq.defaultAnswer
}
})
return { questions: currentAttendenceQuestionsNew, autoAnswers: options.disableAutoAnswers ? [] : questionsAutoAnswereds}
}

@@ -63,0 +56,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