Socket
Socket
Sign inDemoInstall

@voiceflow/common

Package Overview
Dependencies
Maintainers
24
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 8.0.1 to 8.1.0

3

build/cjs/utils/object/common.d.ts

@@ -27,2 +27,5 @@ import { AnyRecord, Struct } from "../../types";

export declare const filterEntries: PickOmitBy;
export declare const mapEntry: <T, R>(obj: Record<string | number | symbol, T>, callback: (entry: [key: string, value: T]) => [string, R]) => {
[k: string]: R;
};
export declare const mapValue: <T, R>(obj: Record<string | number | symbol, T>, callback: (value: T) => R) => {

@@ -29,0 +32,0 @@ [k: string]: R;

4

build/cjs/utils/object/common.js

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.shallowPartialEquals = exports.mapValue = exports.filterEntries = exports.omitBy = exports.pickBy = exports.pick = exports.omit = exports.hasProperty = exports.isObject = exports.selectValue = exports.selectKey = exports.selectID = exports.selectField = exports.shallowEquals = void 0;
exports.shallowPartialEquals = exports.mapValue = exports.mapEntry = exports.filterEntries = exports.omitBy = exports.pickBy = exports.pick = exports.omit = exports.hasProperty = exports.isObject = exports.selectValue = exports.selectKey = exports.selectID = exports.selectField = exports.shallowEquals = void 0;
var shallowequal_1 = require("shallowequal");

@@ -70,2 +70,4 @@ Object.defineProperty(exports, "shallowEquals", { enumerable: true, get: function () { return __importDefault(shallowequal_1).default; } });

exports.filterEntries = exports.pickBy;
const mapEntry = (obj, callback) => Object.fromEntries(Object.entries(obj).map(callback));
exports.mapEntry = mapEntry;
const mapValue = (obj, callback) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, callback(value)]));

@@ -72,0 +74,0 @@ exports.mapValue = mapValue;

@@ -1,6 +0,6 @@

export * from "./environment.js";
export * from "./intent.js";
export * from "./regexp.js";
export * from "./runtime.js";
export * from "./slot.js";
export * from './environment';
export * from './intent';
export * from './regexp';
export * from './runtime';
export * from './slot';
//# sourceMappingURL=index.js.map

@@ -1,4 +0,4 @@

export { default as Base64 } from "./base64.js";
export { default as MurmurHash } from "./murmurhash.js";
export { default as Synchronous } from "./synchronous.js";
export { default as Base64 } from './base64';
export { default as MurmurHash } from './murmurhash';
export { default as Synchronous } from './synchronous';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { hex2abc } from "./hex2abc.js";
import { hex2abc } from "./hex2abc";
import { MurmurHash3 } from 'murmurhash-wasm';

@@ -3,0 +3,0 @@ export class MurmurHash {

@@ -1,7 +0,7 @@

export * from "./constants.js";
export * as Crypto from "./crypto.js";
export * from "./types.js";
export * as Utils from "./utils.js";
export * from './constants';
export * as Crypto from './crypto';
export * from './types';
export * as Utils from './utils';
// TODO: Remove this export once we migrate all utils in other repos.
export * from "./utils.js";
export * from './utils';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { cuid } from "./id.js";
import { cuid } from './id';
const CHARACTERS = Array.from({ length: 26 }).map((_, index) => String.fromCharCode(97 + index));

@@ -3,0 +3,0 @@ export const generateHash = (object) => {

import ObjectId from 'bson-objectid';
import cuid from 'cuid';
import { deepMap, deepMapKeys } from "./object.js";
import { deepMap, deepMapKeys } from './object';
export { cuid };

@@ -5,0 +5,0 @@ export const objectID = () => new ObjectId().toHexString();

@@ -1,23 +0,23 @@

export * as array from "./array.js";
export * as emails from "./emails.js";
export * as functional from "./functional.js";
export { generate, generateHash } from "./generate.js";
export * as id from "./id.js";
export * as intent from "./intent.js";
export * as map from "./map.js";
export * as mathjs from "./mathjs.js";
export * as normalized from "./normalized.js";
export * as number from "./number.js";
export * as object from "./object.js";
export * as promise from "./promise.js";
export * as protocol from "./protocol.js";
export * as slot from "./slot.js";
export * as string from "./string.js";
export * as time from "./time.js";
export * as timezones from "./timezones.js";
export * as typeguard from "./typeguard.js";
export * as variables from "./variables.js";
export * as array from './array';
export * as emails from './emails';
export * as functional from './functional';
export { generate, generateHash } from './generate';
export * as id from './id';
export * as intent from './intent';
export * as map from './map';
export * as mathjs from './mathjs';
export * as normalized from './normalized';
export * as number from './number';
export * as object from './object';
export * as promise from './promise';
export * as protocol from './protocol';
export * as slot from './slot';
export * as string from './string';
export * as time from './time';
export * as timezones from './timezones';
export * as typeguard from './typeguard';
export * as variables from './variables';
// TODO: Remove these exports once we migrate all utils in other repos.
export * from "./intent.js";
export * from "./variables.js";
export * from './intent';
export * from './variables';
//# sourceMappingURL=index.js.map

@@ -1,4 +0,4 @@

import { LOWER_CASE_CUSTOM_SLOT_TYPE, SLOT_REGEXP, SPACE_REGEXP } from "../constants.js";
import { LOWER_CASE_CUSTOM_SLOT_TYPE, SLOT_REGEXP, SPACE_REGEXP } from "../constants";
import _sample from 'lodash/sample';
import { getAllSamples } from "./slot.js";
import { getAllSamples } from './slot';
export const formatIntentName = (name) => {

@@ -5,0 +5,0 @@ if (!name) {

@@ -1,2 +0,2 @@

import { isFunction } from "./functional.js";
import { isFunction } from './functional';
/**

@@ -3,0 +3,0 @@ * Retrieve the value at the given key inside the map.

@@ -12,4 +12,4 @@ var __rest = (this && this.__rest) || function (s, e) {

};
import { stringify } from "./functional.js";
import { hasProperty } from "./object.js";
import { stringify } from './functional';
import { hasProperty } from './object';
const createEmptyNormalized = () => ({ byKey: {}, allKeys: [] });

@@ -16,0 +16,0 @@ export const EMPTY = createEmptyNormalized();

@@ -27,2 +27,5 @@ import { AnyRecord, Struct } from "../../types";

export declare const filterEntries: PickOmitBy;
export declare const mapEntry: <T, R>(obj: Record<string | number | symbol, T>, callback: (entry: [key: string, value: T]) => [string, R]) => {
[k: string]: R;
};
export declare const mapValue: <T, R>(obj: Record<string | number | symbol, T>, callback: (value: T) => R) => {

@@ -29,0 +32,0 @@ [k: string]: R;

@@ -55,4 +55,5 @@ export { default as shallowEquals } from 'shallowequal';

export const filterEntries = pickBy;
export const mapEntry = (obj, callback) => Object.fromEntries(Object.entries(obj).map(callback));
export const mapValue = (obj, callback) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, callback(value)]));
export const shallowPartialEquals = (obj, partial) => Object.entries(partial).every(([key, partialValue]) => hasProperty(obj, key) && partialValue === obj[key]);
//# sourceMappingURL=common.js.map

@@ -1,2 +0,2 @@

import { isObject } from "./common.js";
import { isObject } from './common';
export const deepMap = (object, mapFunction, options = {}) => {

@@ -3,0 +3,0 @@ const cache = new WeakMap();

@@ -1,5 +0,5 @@

export * from "./common.js";
export * from "./deepMap.js";
export * from "./diff.js";
export * from "./keys.js";
export * from './common';
export * from './deepMap';
export * from './diff';
export * from './keys';
//# sourceMappingURL=index.js.map
import _uniqBy from 'lodash/uniqBy';
import { SLOT_REGEXP } from "../constants.js";
import { SLOT_REGEXP } from '../constants';
export const addPrebuiltEntities = (entities, prebuiltEntities) => entities.map((entity) => {

@@ -4,0 +4,0 @@ if (prebuiltEntities[entity.key]) {

@@ -1,2 +0,2 @@

import { READABLE_VARIABLE_REGEXP } from "../constants.js";
import { READABLE_VARIABLE_REGEXP } from "../constants";
export const variableReplacer = (match, inner, variables, modifier) => {

@@ -3,0 +3,0 @@ if (inner in variables) {

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

@@ -63,3 +63,3 @@ "bugs": {

"types": "build/cjs/index.d.ts",
"gitHead": "ca02c328faf4ff3ae771ba44ca358d710aab48cb"
"gitHead": "c040cec9539731257c0616d8c06830e7a2736154"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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