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

@lcap/nasl-utils

Package Overview
Dependencies
Maintainers
0
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lcap/nasl-utils - npm Package Compare versions

Comparing version 3.11.2-beta.1 to 3.11.2-beta.2

20

out/string.d.ts

@@ -49,2 +49,22 @@ /**

/**
* 没下划线时,只处理首字母大写
* 有下划线时,所有字母先处理为小写,首字母大写,下划线后字母大写处理
*/
export declare const toPascalCase: (name: string) => string;
/**
* 没下划线时,只处理首字母小写
* 有下划线时,所有字母先处理为小写,下划线后字母大写处理
*/
export declare const toCamelCase: (name: string) => string;
/**
* 没下划线时,除首字母外,大写字母前增加下划线,所有字母均转换为小写
* 有下划线时,不增加下划线,仅将所有字母转换为小写
*/
export declare const toSnakeAllLowerCase: (name: string) => string;
/**
* 没下划线时,除首字母外,大写字母前增加下划线,所有字母均转换为大写
* 有下划线时,不增加下划线,仅将所有字母转换为大写
*/
export declare const toSnakeAllUpperCase: (name: string) => string;
/**
* @param key 键

@@ -51,0 +71,0 @@ * @param set 数据集合,Array | Map | Set

54

out/string.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDescription = exports.transAssetsToRegx = exports.attrConvertCamelCase = exports.sliceTagContent = exports.getLastOfPath = exports.uniqueMax = exports.unique = exports.firstLowerCase = exports.firstUpperCase = exports.Camel2Snake = exports.Camel2kebab = exports.snake2Camel = exports.kebab2Camel2 = exports.kebab2Pascal = exports.kebab2Camel = void 0;
exports.getDescription = exports.transAssetsToRegx = exports.attrConvertCamelCase = exports.sliceTagContent = exports.getLastOfPath = exports.uniqueMax = exports.unique = exports.toSnakeAllUpperCase = exports.toSnakeAllLowerCase = exports.toCamelCase = exports.toPascalCase = exports.firstLowerCase = exports.firstUpperCase = exports.Camel2Snake = exports.Camel2kebab = exports.snake2Camel = exports.kebab2Camel2 = exports.kebab2Pascal = exports.kebab2Camel = void 0;
/**

@@ -60,2 +60,54 @@ * 中划线格式 转 驼峰格式 kebab-case -> camelCase

/**
* 没下划线时,只处理首字母大写
* 有下划线时,所有字母先处理为小写,首字母大写,下划线后字母大写处理
*/
const toPascalCase = (name) => {
if (name.includes('_')) {
return (0, exports.snake2Camel)(name.toLowerCase(), false);
}
else {
return (0, exports.firstUpperCase)(name);
}
};
exports.toPascalCase = toPascalCase;
/**
* 没下划线时,只处理首字母小写
* 有下划线时,所有字母先处理为小写,下划线后字母大写处理
*/
const toCamelCase = (name) => {
if (name.includes('_')) {
return (0, exports.snake2Camel)(name.toLowerCase(), true);
}
else {
return (0, exports.firstLowerCase)(name);
}
};
exports.toCamelCase = toCamelCase;
/**
* 没下划线时,除首字母外,大写字母前增加下划线,所有字母均转换为小写
* 有下划线时,不增加下划线,仅将所有字母转换为小写
*/
const toSnakeAllLowerCase = (name) => {
if (name.includes('_')) {
return name.toLowerCase();
}
else {
return (0, exports.Camel2Snake)(name).toLowerCase();
}
};
exports.toSnakeAllLowerCase = toSnakeAllLowerCase;
/**
* 没下划线时,除首字母外,大写字母前增加下划线,所有字母均转换为大写
* 有下划线时,不增加下划线,仅将所有字母转换为大写
*/
const toSnakeAllUpperCase = (name) => {
if (name.includes('_')) {
return name.toUpperCase();
}
else {
return (0, exports.Camel2Snake)(name).toUpperCase();
}
};
exports.toSnakeAllUpperCase = toSnakeAllUpperCase;
/**
* @param key 键

@@ -62,0 +114,0 @@ * @param set 数据集合,Array | Map | Set

4

package.json
{
"name": "@lcap/nasl-utils",
"description": "NetEase Application Specific Language",
"version": "3.11.2-beta.1",
"version": "3.11.2-beta.2",
"author": "Forrest <rainforest92@126.com>",

@@ -26,3 +26,3 @@ "main": "./out",

"uuid": "8.3.2",
"@lcap/nasl-types": "3.11.2-beta.1"
"@lcap/nasl-types": "3.11.2-beta.2"
},

@@ -29,0 +29,0 @@ "scripts": {

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