Socket
Book a DemoInstallSign in
Socket

@deephaven/utils

Package Overview
Dependencies
Maintainers
8
Versions
927
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deephaven/utils - npm Package Compare versions

Comparing version

to
1.4.1-react19.43

24

dist/DbNameValidator.js

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

var _DbNameValidator;
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }

@@ -40,2 +41,3 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }

class DbNameValidator {}
_DbNameValidator = DbNameValidator;
_defineProperty(DbNameValidator, "legalize", (name, replace, prefix, regex, checkReserved, i) => {

@@ -65,8 +67,20 @@ var legalName = replace(name.trim());

});
_defineProperty(DbNameValidator, "legalizeTableName", name => DbNameValidator.legalize(name, tableNameReplacer, TABLE_PREFIX, STERILE_TABLE_AND_NAMESPACE_REGEX, false, 0));
_defineProperty(DbNameValidator, "makeVariableName", name => DbNameValidator.legalizeTableName(name).replace(STERILE_VARIABLE_NAME_REGEX, '_'));
/**
* Get a legal table name based on the passed in string.
* Follows the same rules as DBNameValidator.java except that here
* we prepend a prefix in cases where the Java class throws an exception.
* @param name The name to legalize
* @returns Legalized table name
*/
_defineProperty(DbNameValidator, "legalizeTableName", name => _DbNameValidator.legalize(name, tableNameReplacer, TABLE_PREFIX, STERILE_TABLE_AND_NAMESPACE_REGEX, false, 0));
/**
* Make a valid variable name based on the passed in string.
* @param name The name to get the variable name for
* @returns Variable name
*/
_defineProperty(DbNameValidator, "makeVariableName", name => _DbNameValidator.legalizeTableName(name).replace(STERILE_VARIABLE_NAME_REGEX, '_'));
_defineProperty(DbNameValidator, "legalizeColumnNames", headers => {
var legalHeaders = [];
headers.forEach((header, i) => {
var legalHeader = DbNameValidator.legalizeColumnName(header, i);
var legalHeader = _DbNameValidator.legalizeColumnName(header, i);

@@ -85,8 +99,8 @@ // Check if the name is already in use

// Replace all dashes and spaces with underscores
DbNameValidator.legalize(header, columnNameReplacer, COLUMN_PREFIX, STERILE_COLUMN_AND_QUERY_REGEX, true, i)
_DbNameValidator.legalize(header, columnNameReplacer, COLUMN_PREFIX, STERILE_COLUMN_AND_QUERY_REGEX, true, i)
);
});
_defineProperty(DbNameValidator, "isValidTableName", name => TABLE_NAME_PATTERN.test(name));
_defineProperty(DbNameValidator, "isValidColumnName", name => DbNameValidator.legalizeColumnName(name) === name);
_defineProperty(DbNameValidator, "isValidColumnName", name => _DbNameValidator.legalizeColumnName(name) === name);
export default DbNameValidator;
//# sourceMappingURL=DbNameValidator.js.map

@@ -53,3 +53,12 @@ declare const __brand: unique symbol;

export type ValueOf<T> = T[keyof T];
/**
* Removes the index signature from a type.
* This can be useful if you want to Omit a key from a type,
* but the type has an index signature. Otherwise, the index signature
* is the only thing that remains after Omit.
*/
export type RemoveIndexSignature<T> = {
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
};
export {};
//# sourceMappingURL=TypeUtils.d.ts.map
{
"name": "@deephaven/utils",
"version": "1.4.1-beta.2+eca54cac",
"version": "1.4.1-react19.43+f9a21bd4",
"description": "Deephaven Utils",

@@ -32,9 +32,9 @@ "author": "Deephaven Data Labs LLC",

"dependencies": {
"@deephaven/log": "^1.4.1-beta.2+eca54cac",
"@deephaven/log": "^1.4.1-react19.43+f9a21bd4",
"nanoid": "^5.0.7"
},
"devDependencies": {
"@deephaven/test-utils": "^1.4.1-beta.2+eca54cac"
"@deephaven/test-utils": "^1.4.1-react19.43+f9a21bd4"
},
"gitHead": "eca54cacdfbf64ba5171231169f37b842ba47bb9"
"gitHead": "f9a21bd44f32c4357db62f2b9a8eaecedde0e446"
}

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

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