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

@botmock-api/utils

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@botmock-api/utils - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

6

dist/index.js

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

var localCollected = collected;
// iterate of all next messages; if message not found in intent map,
var witnessedMessages = [];
// iterate over all next messages; if message not found in intent map,
// explore this message's next messages
for (var _i = 0, next_1 = next; _i < next_1.length; _i++) {
var message_id = next_1[_i].message_id;
if (!map.has(message_id)) {
witnessedMessages.push(message_id);
if (!map.has(message_id) && !witnessedMessages.includes(message_id)) {
var next_message_ids = getMessage(message_id).next_message_ids;

@@ -74,0 +76,0 @@ localCollected = f(next_message_ids, collected.concat([message_id]));

{
"name": "@botmock-api/utils",
"version": "1.1.0",
"version": "1.2.0",
"description": "utilities for handling data from the Botmock API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -87,8 +87,10 @@ type Utterance = {

export const createMessageCollector = <A, B>(map: IntentMap, getMessage: any) =>
function f(next: NextMessage[], collected: string[] = []) {
function f(next: NextMessage[], collected: string[] = []): string[] {
let localCollected = collected;
// iterate of all next messages; if message not found in intent map,
const witnessedMessages: string[] = [];
// iterate over all next messages; if message not found in intent map,
// explore this message's next messages
for (const { message_id } of next) {
if (!map.has(message_id)) {
witnessedMessages.push(message_id);
if (!map.has(message_id) && !witnessedMessages.includes(message_id)) {
const { next_message_ids } = getMessage(message_id);

@@ -95,0 +97,0 @@ localCollected = f(next_message_ids, [...collected, message_id]);

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