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

@luvio/utils

Package Overview
Dependencies
Maintainers
11
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@luvio/utils - npm Package Compare versions

Comparing version 3.5.1 to 3.5.2

7

dist/types/string.d.ts

@@ -9,1 +9,8 @@ export declare function toPascalCase(s: string): string;

export declare const toCamelCase: (name: string) => string;
/**
* Converts the passed string to screaming snake case, i.e. uppercase words separated by underscores.
*
* @param name the param name to convert
* @returns a constant case version of the parameter
*/
export declare const toScreamingSnakeCase: (name: string) => string;

18

dist/utils.js

@@ -186,2 +186,18 @@ /**

.replace(/^(.)/, (_, m) => m.toLowerCase());
/**
* Converts the passed string to screaming snake case, i.e. uppercase words separated by underscores.
*
* @param name the param name to convert
* @returns a constant case version of the parameter
*/
const toScreamingSnakeCase = (name) => name
// -+, _+
// split on existing hyphens & underscores, "foo-bar_baz" => [foo, bar, baz]
// (?<=[a-z])(?=[A-Z])
// split at transition from lowercase to uppercase, "fooBar" => [foo, Bar]
// (?<=[A-Z])(?=[A-Z][a-z])
// split at transition from uppercase to lowercase, "FOOBar" => [FOO, Bar]
.split(/-+|_+|(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/)
.join('_')
.toUpperCase();

@@ -198,2 +214,2 @@ /**

export { ConsoleFileParserLogger, ConsoleLogger, LogLevelMap, bfs, emptyServices, includes, isPromiseLike, loggerService, satisfies, toCamelCase, toPascalCase };
export { ConsoleFileParserLogger, ConsoleLogger, LogLevelMap, bfs, emptyServices, includes, isPromiseLike, loggerService, satisfies, toCamelCase, toPascalCase, toScreamingSnakeCase };

2

package.json
{
"name": "@luvio/utils",
"version": "3.5.1",
"version": "3.5.2",
"description": "Luvio utils",

@@ -5,0 +5,0 @@ "repository": {

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