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

@contrail/util

Package Overview
Dependencies
Maintainers
8
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/util - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

2

lib/string-util/string-util.d.ts
export declare class StringUtil {
static convertToHyphenCase(entityName: string, transformToLowerCase?: boolean): string;
static parseVariables(variableString: string, data: any, quoteStrings?: boolean): string;
static convertToCamelCase(str: any): any;
static convertToTitleCase(str: any): any;
static isString(value: any): boolean;
static isArray(value: any): boolean;
}

@@ -44,2 +44,12 @@ "use strict";

}
static convertToCamelCase(str) {
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
return index === 0 ? word.toLowerCase() : word.toUpperCase();
}).replace(/\s+/g, '');
}
static convertToTitleCase(str) {
const camelCase = this.convertToCamelCase(str);
const withSpaces = camelCase.replace(/([A-Z])/g, " $1");
return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1);
}
static isString(value) {

@@ -46,0 +56,0 @@ return typeof value === 'string' || value instanceof String;

2

package.json
{
"name": "@contrail/util",
"version": "1.0.16",
"version": "1.0.17",
"description": "General javascript utilities",

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

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