Socket
Socket
Sign inDemoInstall

@voiceflow/common

Package Overview
Dependencies
Maintainers
13
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voiceflow/common - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

lib/constants/index.js

1

lib/index.js

@@ -8,2 +8,3 @@ 'use strict';

middleware: require('./middleware'),
constants: require('./constants'),
};

4

lib/utils/index.js

@@ -8,6 +8,4 @@ 'use strict';

intent: require('./intents'),
intentConstants: require('./intentConstants'),
slotConstants: require('./slotConstants'),
draftToMarkdown: require('./draftToMarkdown'),
draft: require('./draft'),
intentCharRegex: require('./intentCharRegex'),
};

@@ -7,14 +7,12 @@ 'use strict';

const randomstring = require('randomstring');
const { SLOT_TYPES } = require('./intentConstants');
const { SLOT_TYPES } = require('../constants/intents');
const { validSpokenCharacters, validLatinChars } = require('./intentCharRegex');
const draftToMarkdown = require('./draftToMarkdown');
const draft = require('./draft');
const ALPHABET = 'abcdefghijklmnopqrstuvwxyz';
const formatName = (name) => {
let formatted_name = name.replace(' ', '_');
let formattedName = name.replace(' ', '_');
Array.from(Array(10).keys()).forEach((i) => {
formatted_name = formatted_name.replace(i.toString(), String.fromCharCode(i + 65));
formattedName = formattedName.replace(i.toString(), String.fromCharCode(i + 65));
});
return formatted_name;
return formattedName;
};

@@ -171,3 +169,3 @@

// make sure the first letter is valid alphanumeric
while (!ALPHABET.includes(name.charAt(0)) && name.length > 0) {
while (!/[A-Za-z]/.test(name.charAt(0)) && name.length > 0) {
name = name.substring(1);

@@ -208,3 +206,3 @@ }

if (typeof val === 'object' && val && val.blocks && val.entityMap) {
val = draftToMarkdown(val);
val = draft.toPlainTextSanitize(val);
}

@@ -211,0 +209,0 @@ if (typeof val === 'object' && val && val.value !== undefined && typeof val.value !== 'object') {

{
"name": "@voiceflow/common",
"description": "Junk drawer of utility functions",
"version": "4.1.0",
"version": "4.2.0",
"author": "Voiceflow",

@@ -6,0 +6,0 @@ "bugs": {

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