case-anything
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -75,5 +75,3 @@ 'use strict'; | ||
function kebabCase(string) { | ||
return getParts(string, noSpecialChars) | ||
.join('-') | ||
.toLowerCase(); | ||
return getParts(string, noSpecialChars).join('-').toLowerCase(); | ||
} | ||
@@ -88,5 +86,3 @@ /** | ||
function snakeCase(string) { | ||
return getParts(string, noSpecialChars) | ||
.join('_') | ||
.toLowerCase(); | ||
return getParts(string, noSpecialChars).join('_').toLowerCase(); | ||
} | ||
@@ -101,5 +97,3 @@ /** | ||
function constantCase(string) { | ||
return getParts(string, noSpecialChars) | ||
.join('_') | ||
.toUpperCase(); | ||
return getParts(string, noSpecialChars).join('_').toUpperCase(); | ||
} | ||
@@ -136,3 +130,3 @@ /** | ||
.reduce(function (result, match) { | ||
return result + " " + capitaliseWord(match); | ||
return "".concat(result, " ").concat(capitaliseWord(match)); | ||
}, '') | ||
@@ -149,5 +143,3 @@ .trim(); | ||
function lowerCase(string) { | ||
return getParts(string) | ||
.join(' ') | ||
.toLowerCase(); | ||
return getParts(string).join(' ').toLowerCase(); | ||
} | ||
@@ -162,5 +154,3 @@ /** | ||
function upperCase(string) { | ||
return getParts(string) | ||
.join(' ') | ||
.toUpperCase(); | ||
return getParts(string).join(' ').toUpperCase(); | ||
} | ||
@@ -167,0 +157,0 @@ |
@@ -71,5 +71,3 @@ // Latin-1 Supplement | ||
function kebabCase(string) { | ||
return getParts(string, noSpecialChars) | ||
.join('-') | ||
.toLowerCase(); | ||
return getParts(string, noSpecialChars).join('-').toLowerCase(); | ||
} | ||
@@ -84,5 +82,3 @@ /** | ||
function snakeCase(string) { | ||
return getParts(string, noSpecialChars) | ||
.join('_') | ||
.toLowerCase(); | ||
return getParts(string, noSpecialChars).join('_').toLowerCase(); | ||
} | ||
@@ -97,5 +93,3 @@ /** | ||
function constantCase(string) { | ||
return getParts(string, noSpecialChars) | ||
.join('_') | ||
.toUpperCase(); | ||
return getParts(string, noSpecialChars).join('_').toUpperCase(); | ||
} | ||
@@ -132,3 +126,3 @@ /** | ||
.reduce(function (result, match) { | ||
return result + " " + capitaliseWord(match); | ||
return "".concat(result, " ").concat(capitaliseWord(match)); | ||
}, '') | ||
@@ -145,5 +139,3 @@ .trim(); | ||
function lowerCase(string) { | ||
return getParts(string) | ||
.join(' ') | ||
.toLowerCase(); | ||
return getParts(string).join(' ').toLowerCase(); | ||
} | ||
@@ -158,7 +150,5 @@ /** | ||
function upperCase(string) { | ||
return getParts(string) | ||
.join(' ') | ||
.toUpperCase(); | ||
return getParts(string).join(' ').toUpperCase(); | ||
} | ||
export { camelCase, capitalCase, constantCase, kebabCase, lowerCase, pascalCase, pathCase, snakeCase, spaceCase, upperCase }; |
{ | ||
"name": "case-anything", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"sideEffects": false, | ||
"description": "camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.js", | ||
"types": "types/index.d.ts", | ||
"module": "./dist/index.es.js", | ||
"main": "./dist/index.umd.js", | ||
"types": "./dist/types/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.es.js", | ||
"require": "./dist/index.umd.js", | ||
"types": "./dist/types/index.d.ts" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
@@ -17,15 +27,15 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.21.0", | ||
"@typescript-eslint/parser": "^4.21.0", | ||
"@typescript-eslint/eslint-plugin": "^5.8.1", | ||
"@typescript-eslint/parser": "^5.8.1", | ||
"ava": "^3.15.0", | ||
"eslint": "^7.23.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-tree-shaking": "^1.8.0", | ||
"np": "^7.4.0", | ||
"prettier": "^2.2.1", | ||
"rollup": "^2.44.0", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"ts-node": "^9.1.1", | ||
"tsconfig-paths": "^3.9.0", | ||
"typescript": "^4.2.4" | ||
"eslint": "^8.5.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-tree-shaking": "^1.9.2", | ||
"np": "^7.6.0", | ||
"prettier": "^2.5.1", | ||
"rollup": "^2.62.0", | ||
"rollup-plugin-typescript2": "^0.31.1", | ||
"ts-node": "^10.4.0", | ||
"tsconfig-paths": "^3.12.0", | ||
"typescript": "^4.5.4" | ||
}, | ||
@@ -32,0 +42,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20252
8
406
1