Socket
Socket
Sign inDemoInstall

virtual-core

Package Overview
Dependencies
2
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

4

lib/src/SampleUtterances.d.ts

@@ -5,4 +5,3 @@ import { IModel } from "./IModel";

private samples;
constructor(interactionModel: IModel);
addBuiltInSampleUtterances(): void;
setInteractionModel(interactionModel: IModel): void;
interactionModel(): IModel;

@@ -12,3 +11,2 @@ addSample(intent: string, sample: string): void;

defaultUtterance(): SamplePhrase;
private parseFlatFile(fileData);
}

@@ -15,0 +13,0 @@ export declare class SamplePhrase {

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

class SampleUtterances {
constructor(interactionModel) {
constructor() {
this.samples = {};
}
setInteractionModel(interactionModel) {
this._interactionModel = interactionModel;
}
addBuiltInSampleUtterances() {
const builtinValues = BuiltinUtterances_1.BuiltinUtterances.values();

@@ -39,17 +39,2 @@ for (const key of Object.keys(builtinValues)) {

}
parseFlatFile(fileData) {
const lines = fileData.split("\n");
for (const line of lines) {
if (line.trim().length === 0) {
continue;
}
const index = line.indexOf(" ");
if (index === -1) {
throw Error("Invalid sample utterance: " + line);
}
const intent = line.substr(0, index);
const sample = line.substr(index).trim();
this.addSample(intent, sample);
}
}
}

@@ -56,0 +41,0 @@ exports.SampleUtterances = SampleUtterances;

@@ -5,3 +5,3 @@ {

"private": false,
"version": "0.0.4",
"version": "0.0.5",
"main": "./lib/src/Index.js",

@@ -8,0 +8,0 @@ "typings": "./lib/src/Index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc