Socket
Socket
Sign inDemoInstall

@telefonica/language-model-converter

Package Overview
Dependencies
Maintainers
16
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@telefonica/language-model-converter - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

trainig.json

17

lib/parser.js

@@ -214,8 +214,23 @@ "use strict";

for (const key in source) {
if (isObject(source[key])) {
if (!source[key]) {
continue;
}
else if (isObject(source[key])) {
if (!target[key]) {
Object.assign(target, { [key]: {} });
}
if (!isObject(target[key])) {
throw new Error(`Property ${key} already exist in target but it is not an object`);
}
mergeDeep(target[key], source[key]);
}
else if (Array.isArray(source[key])) {
if (!target[key]) {
Object.assign(target, { [key]: [] });
}
if (!Array.isArray(target[key])) {
throw new Error(`Property ${key} already exist in target but it is not an array`);
}
target[key] = _.uniq(target[key].concat(source[key]));
}
else {

@@ -222,0 +237,0 @@ Object.assign(target, { [key]: source[key] });

2

package.json
{
"name": "@telefonica/language-model-converter",
"version": "2.5.0",
"version": "2.5.1",
"description": "Language model converter yaml <-> json for LUIS",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -298,13 +298,27 @@ /**

for (const key in source) {
if (isObject(source[key])) {
if (!target[key]) {
Object.assign(target, { [key]: {} });
if (!source[key]) {
// Ignore empty values such as an intent key without examples
continue;
} else if (isObject(source[key])) {
if (!target[key]) {
Object.assign(target, { [key]: {} });
}
if (!isObject(target[key])) {
throw new Error(`Property ${key} already exist in target but it is not an object`);
}
mergeDeep(target[key], source[key]);
} else if (Array.isArray(source[key])) {
if (!target[key]) {
Object.assign(target, { [key]: [] });
}
if (!Array.isArray(target[key])) {
throw new Error(`Property ${key} already exist in target but it is not an array`);
}
target[key] = _.uniq(target[key].concat(source[key]));
} else {
Object.assign(target, { [key]: source[key] });
}
mergeDeep(target[key], source[key]);
} else {
Object.assign(target, { [key]: source[key] });
}
}
}
return target;
}

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