case-anything
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "case-anything", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"sideEffects": false, | ||
@@ -8,3 +8,3 @@ "description": "camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)", | ||
"module": "dist/index.esm.js", | ||
"typings": "types/index.d.ts", | ||
"types": "types/index.d.ts", | ||
"scripts": { | ||
@@ -14,17 +14,19 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"rollup": "rollup -c build.js", | ||
"build": "rm -rf ./dist && npm run lint && npm run rollup && npm run test" | ||
"build": "rm -rf ./dist && npm run lint && npm run rollup && npm run test", | ||
"release": "npm run build && np" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^3.10.1", | ||
"@typescript-eslint/parser": "^3.10.1", | ||
"ava": "^3.12.1", | ||
"eslint": "^7.7.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"@typescript-eslint/eslint-plugin": "^4.21.0", | ||
"@typescript-eslint/parser": "^4.21.0", | ||
"ava": "^3.15.0", | ||
"eslint": "^7.23.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-tree-shaking": "^1.8.0", | ||
"rollup": "^2.26.8", | ||
"rollup-plugin-typescript2": "^0.27.2", | ||
"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", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.2" | ||
"typescript": "^4.2.4" | ||
}, | ||
@@ -68,3 +70,32 @@ "repository": { | ||
] | ||
}, | ||
"np": { | ||
"yarn": false, | ||
"branch": "production" | ||
}, | ||
"eslintConfig": { | ||
"ignorePatterns": [ | ||
"node_modules", | ||
"dist", | ||
"coverage", | ||
"test" | ||
], | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"tree-shaking" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
"tree-shaking/no-side-effects-in-initialization": "error" | ||
} | ||
} | ||
} |
@@ -75,3 +75,3 @@ # Case anything 🐫 | ||
As soon as there is a space in the target string, it will regard the input as a "sentence" and only split each part at the spaces. | ||
As soon as there is a space in the target string, it will regard the input as a _sentence_ and only split each part at the spaces. | ||
@@ -82,3 +82,3 @@ See this example to understand each case: | ||
```js | ||
const str = "listen I'm O.K.!" | ||
const str = `listen I'm O.K.!` | ||
@@ -93,7 +93,7 @@ // splits on spaces & removes special characters | ||
// splits on spaces & keeps special characters | ||
spaceCase(str) === "listen I'm O.K.!" | ||
pathCase(str) === "listen/I'm/O.K.!" | ||
lowerCase(str) === "listen i'm o.k.!" | ||
upperCase(str) === "LISTEN I'M O.K.!" | ||
capitalCase(str) === "Listen I'm O.k.!" | ||
spaceCase(str) === `listen I'm O.K.!` | ||
pathCase(str) === `listen/I'm/O.K.!` | ||
lowerCase(str) === `listen i'm o.k.!` | ||
upperCase(str) === `LISTEN I'M O.K.!` | ||
capitalCase(str) === `Listen I'm O.k.!` | ||
``` | ||
@@ -106,3 +106,3 @@ <!-- prettier-ignore-end --> | ||
I have extended regular alphabet with the most common "Latin-1 Supplement" special characters. | ||
I have extended regular alphabet with the most common _Latin-1 Supplement_ special characters. | ||
@@ -123,7 +123,7 @@ The coolest thing about this library is that it will **"convert" special characters into regular alphabet** for the cases used as variable names! 😎 | ||
// DOES NOT convert special characters: | ||
spaceCase(str) === "Çâfé Ågård" | ||
pathCase(str) === "Çâfé/Ågård" | ||
lowerCase(str) === "çâfé ågård" | ||
upperCase(str) === "ÇÂFÉ ÅGÅRD" | ||
capitalCase(str) === "Çâfé Ågård" | ||
spaceCase(str) === 'Çâfé Ågård' | ||
pathCase(str) === 'Çâfé/Ågård' | ||
lowerCase(str) === 'çâfé ågård' | ||
upperCase(str) === 'ÇÂFÉ ÅGÅRD' | ||
capitalCase(str) === 'Çâfé Ågård' | ||
``` | ||
@@ -130,0 +130,0 @@ <!-- prettier-ignore-end --> |
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
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
1240002
13
18
845