Socket
Socket
Sign inDemoInstall

case-anything

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

case-anything - npm Package Compare versions

Comparing version 2.1.5 to 2.1.6

22

dist/index.es.js

@@ -147,3 +147,3 @@ // Latin-1 Supplement

function kebabCase(string, options) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: '-' }))
return splitAndPrefix(string, { ...options, prefix: '-' })
.join('')

@@ -164,3 +164,3 @@ .toLowerCase();

function snakeCase(string, options) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: '_' }))
return splitAndPrefix(string, { ...options, prefix: '_' })
.join('')

@@ -181,3 +181,3 @@ .toLowerCase();

function constantCase(string, options) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: '_' }))
return splitAndPrefix(string, { ...options, prefix: '_' })
.join('')

@@ -198,3 +198,3 @@ .toUpperCase();

function trainCase(string, options) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: '-' }))
return splitAndPrefix(string, { ...options, prefix: '-' })
.map((word) => capitaliseWord(word))

@@ -215,3 +215,3 @@ .join('');

function adaCase(string, options) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: '_' }))
return splitAndPrefix(string, { ...options, prefix: '_' })
.map((part) => capitaliseWord(part))

@@ -232,3 +232,3 @@ .join('');

function cobolCase(string, options) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: '-' }))
return splitAndPrefix(string, { ...options, prefix: '-' })
.join('')

@@ -249,3 +249,3 @@ .toUpperCase();

function dotNotation(string, options) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: '.' })).join('');
return splitAndPrefix(string, { ...options, prefix: '.' }).join('');
}

@@ -281,3 +281,3 @@ /**

function spaceCase(string, options = { keepSpecialCharacters: true }) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: ' ' })).join('');
return splitAndPrefix(string, { ...options, prefix: ' ' }).join('');
}

@@ -298,3 +298,3 @@ /**

function capitalCase(string, options = { keepSpecialCharacters: true }) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: ' ' })).reduce((result, word) => {
return splitAndPrefix(string, { ...options, prefix: ' ' }).reduce((result, word) => {
return result + capitaliseWord(word);

@@ -317,3 +317,3 @@ }, '');

function lowerCase(string, options = { keepSpecialCharacters: true }) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: ' ' }))
return splitAndPrefix(string, { ...options, prefix: ' ' })
.join('')

@@ -336,3 +336,3 @@ .toLowerCase();

function upperCase(string, options = { keepSpecialCharacters: true }) {
return splitAndPrefix(string, Object.assign(Object.assign({}, options), { prefix: ' ' }))
return splitAndPrefix(string, { ...options, prefix: ' ' })
.join('')

@@ -339,0 +339,0 @@ .toUpperCase();

{
"name": "case-anything",
"version": "2.1.5",
"version": "2.1.6",
"sideEffects": false,
"type": "module",
"sideEffects": false,
"description": "camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)",

@@ -25,11 +25,11 @@ "module": "./dist/index.es.js",

"scripts": {
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"test": "vitest run --reporter=verbose",
"rollup": "rollup -c build.js",
"build": "rm -rf ./dist && npm run lint && npm run rollup && npm run test",
"release": "npm run build && np"
"lint": "tsc --noEmit && eslint ./src --ext .ts",
"test": "vitest run",
"build": "rollup -c ./scripts/build.js",
"release": "npm run lint && del dist && npm run build && np"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"del-cli": "^4.0.1",
"eslint": "^8.7.0",

@@ -40,6 +40,6 @@ "eslint-config-prettier": "^8.3.0",

"prettier": "^2.5.1",
"rollup": "^2.64.0",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"typescript": "^4.5.4",
"vitest": "^0.1.24"
"typescript": "^4.5.5",
"vitest": "^0.2.1"
},

@@ -74,2 +74,3 @@ "repository": {

"author": "Luca Ban - Mesqueeb",
"funding": "https://github.com/sponsors/mesqueeb",
"license": "MIT",

@@ -88,3 +89,3 @@ "bugs": {

"dist",
"coverage",
"scripts",
"test"

@@ -105,7 +106,9 @@ ],

"rules": {
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"tree-shaking/no-side-effects-in-initialization": "error"
"tree-shaking/no-side-effects-in-initialization": "error",
"@typescript-eslint/ban-ts-comment": "off"
}
}
}

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