Socket
Socket
Sign inDemoInstall

@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 0.5.0 to 0.5.1

.circleci/config.yml

6

__tests__/index.js

@@ -16,2 +16,6 @@ import { enumeratePaths, createIntentMap, createNodeCollector } from '../src';

});
test.todo('handles loops');
test.todo('handles multi edges');
test.todo('handles simple graphs');
test.todo('flattened set has length exponential in the number of nodes');
});

@@ -23,2 +27,3 @@

});
test.todo('does not contain message not following an intent');
});

@@ -30,2 +35,3 @@

});
test.todo('returned function does not collect nodes connected by intents');
});

2

package.json
{
"name": "@botmock-api/utils",
"version": "0.5.0",
"version": "0.5.1",
"description": "utilities for handling data from the Botmock API",

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

@@ -15,9 +15,13 @@ # utils

#### enumeratePaths
```js
utils.enumeratePaths({ messages: string[], connections: string[] }): Set<Array<string>>
utils.enumeratePaths(messages: Message[]): Set<Array<string>>
```
Function that returns a [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)
which contains arrays with the message ids of each possible journey in the provided messages + connections
which contains arrays with the message ids of each possible journey in the provided messages
#### createIntentMap
```js

@@ -30,2 +34,4 @@ utils.createIntentMap(messages: []): Map<messageId: string, intentIds: string[]>

#### createNodeCollector
```js

@@ -32,0 +38,0 @@ utils.createNodeCollector(map: Map, get: (id: string) => ({}): (arr: string[]) => string[]

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