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

@azure-tools/codegen

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure-tools/codegen - npm Package Compare versions

Comparing version 2.2.243 to 2.2.244

51

dist/formatter.js

@@ -15,2 +15,8 @@ "use strict";

}
function wrap(prefix, postfix, style) {
if (postfix || prefix) {
return (i, r, o) => typeof i === 'string' && typeof (o) === 'object' ? o[i.toLowerCase()] || `${prefix}${style(i, r, o)}${postfix}` : `${prefix}${style(i, r, o)}${postfix}`;
}
return style;
}
function applyFormat(normalizedContent, overrides = {}, separator = '', formatter = (s, i) => s) {

@@ -27,21 +33,28 @@ return normalizedContent.map((each, index) => overrides[each.toLowerCase()] || formatter(each, index)).join(separator);

static select(style, fallback) {
switch (`${style}`.toLowerCase()) {
case 'camelcase':
case 'camel':
return Style.camel;
case 'pascalcase':
case 'pascal':
return Style.pascal;
case 'snakecase':
case 'snake':
return Style.snake;
case 'uppercase':
case 'upper':
return Style.upper;
case 'kebabcase':
case 'kebab':
return Style.kebab;
case 'spacecase':
case 'space':
return Style.space;
if (style) {
const styles = /^([a-zA-Z0-9_]*?\+?)([a-zA-Z]+)(\+?[a-zA-Z0-9_]*)$/g.exec(style.replace(/\s*/g, ''));
if (styles) {
const prefix = styles[1] ? styles[1].substring(0, styles[1].length - 1) : '';
const postfix = styles[3] ? styles[3].substring(1) : '';
switch (styles[2]) {
case 'camelcase':
case 'camel':
return wrap(prefix, postfix, Style.camel);
case 'pascalcase':
case 'pascal':
return wrap(prefix, postfix, Style.pascal);
case 'snakecase':
case 'snake':
return wrap(prefix, postfix, Style.snake);
case 'uppercase':
case 'upper':
return wrap(prefix, postfix, Style.upper);
case 'kebabcase':
case 'kebab':
return wrap(prefix, postfix, Style.kebab);
case 'spacecase':
case 'space':
return wrap(prefix, postfix, Style.space);
}
}
}

@@ -48,0 +61,0 @@ return fallback;

{
"name": "@azure-tools/codegen",
"version": "2.2.243",
"version": "2.2.244",
"patchOffset": 100,

@@ -5,0 +5,0 @@ "description": "Autorest Code generator common and base classes",

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