@pixpilot/string 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/case.cjs +1 -0
- package/dist/case.d.ts +48 -0
- package/dist/case.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 pixpilot
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/case.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("change-case");exports.toCamelCase=function(t){return e.camelCase(t)},exports.toCapitalCase=function(t){return e.capitalCase(t)},exports.toConstantCase=function(t){return e.constantCase(t)},exports.toDotCase=function(t){return e.dotCase(t)},exports.toKebabCase=function(t){return e.kebabCase(t)},exports.toNoCase=function(t){return e.noCase(t)},exports.toPascalCase=function(t){return e.pascalCase(t)},exports.toPascalSnakeCase=function(t){return e.pascalSnakeCase(t)},exports.toPathCase=function(t){return e.pathCase(t)},exports.toSentenceCase=function(t){return e.sentenceCase(t)},exports.toSnakeCase=function(t){return e.snakeCase(t)},exports.toTrainCase=function(t){return e.trainCase(t)};
|
package/dist/case.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a string to camel case (`fooBar`).
|
|
3
|
+
*/
|
|
4
|
+
export declare function toCamelCase(str: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Convert a string to capital case (`Foo Bar`).
|
|
7
|
+
*/
|
|
8
|
+
export declare function toCapitalCase(str: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Convert a string to constant case (`CONSTANT_CASE`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function toConstantCase(str: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Convert a string to dot case (`dot.case`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function toDotCase(str: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Convert a string to kebab case (`kebab-case`).
|
|
19
|
+
*/
|
|
20
|
+
export declare function toKebabCase(str: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Convert a string to no case (`no case`).
|
|
23
|
+
*/
|
|
24
|
+
export declare function toNoCase(str: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Convert a string to pascal case (`PascalCase`).
|
|
27
|
+
*/
|
|
28
|
+
export declare function toPascalCase(str: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Convert a string to pascal snake case (`Pascal_Snake_Case`).
|
|
31
|
+
*/
|
|
32
|
+
export declare function toPascalSnakeCase(str: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Convert a string to path case (`path/case`).
|
|
35
|
+
*/
|
|
36
|
+
export declare function toPathCase(str: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Convert a string to sentence case (`Sentence case`).
|
|
39
|
+
*/
|
|
40
|
+
export declare function toSentenceCase(str: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Convert a string to snake case (`snake_case`).
|
|
43
|
+
*/
|
|
44
|
+
export declare function toSnakeCase(str: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Convert a string to train case (`Train-Case`).
|
|
47
|
+
*/
|
|
48
|
+
export declare function toTrainCase(str: string): string;
|
package/dist/case.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{camelCase as n,capitalCase as r,constantCase as t,dotCase as u,kebabCase as e,noCase as o,pascalCase as c,pascalSnakeCase as f,pathCase as i,sentenceCase as a,snakeCase as m,trainCase as p}from"change-case";function g(r){return n(r)}function h(n){return r(n)}function s(n){return t(n)}function x(n){return u(n)}function b(n){return e(n)}function d(n){return o(n)}function j(n){return c(n)}function k(n){return f(n)}function l(n){return i(n)}function q(n){return a(n)}function v(n){return m(n)}function w(n){return p(n)}export{g as toCamelCase,h as toCapitalCase,s as toConstantCase,x as toDotCase,b as toKebabCase,d as toNoCase,j as toPascalCase,k as toPascalSnakeCase,l as toPathCase,q as toSentenceCase,v as toSnakeCase,w as toTrainCase};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./case.cjs");exports.toCamelCase=e.toCamelCase,exports.toCapitalCase=e.toCapitalCase,exports.toConstantCase=e.toConstantCase,exports.toDotCase=e.toDotCase,exports.toKebabCase=e.toKebabCase,exports.toNoCase=e.toNoCase,exports.toPascalCase=e.toPascalCase,exports.toPascalSnakeCase=e.toPascalSnakeCase,exports.toPathCase=e.toPathCase,exports.toSentenceCase=e.toSentenceCase,exports.toSnakeCase=e.toSnakeCase,exports.toTrainCase=e.toTrainCase;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './case';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{toCamelCase,toCapitalCase,toConstantCase,toDotCase,toKebabCase,toNoCase,toPascalCase,toPascalSnakeCase,toPathCase,toSentenceCase,toSnakeCase,toTrainCase}from"./case.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pixpilot/string",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.3",
|
|
5
|
+
"author": "Pixpilot <m.doaie@hotmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/pixpilot/js-utils.git",
|
|
10
|
+
"directory": "packages/string"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"change-case": "^5.4.4"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^22.18.10",
|
|
31
|
+
"eslint": "^9.37.0",
|
|
32
|
+
"rollup": "^4.52.4",
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
|
+
"@internal/eslint-config": "0.3.0",
|
|
35
|
+
"@internal/tsconfig": "0.1.0",
|
|
36
|
+
"@internal/rollup-config": "0.1.0",
|
|
37
|
+
"@internal/vitest-config": "0.1.0",
|
|
38
|
+
"@internal/prettier-config": "0.0.1"
|
|
39
|
+
},
|
|
40
|
+
"prettier": "@internal/prettier-config",
|
|
41
|
+
"scripts": {
|
|
42
|
+
"clean": "git clean -xdf .cache .turbo dist",
|
|
43
|
+
"clean:all": "git clean -xdf .cache .turbo dist node_modules",
|
|
44
|
+
"build": "pnpm run clean && rollup -c",
|
|
45
|
+
"test": "vitest --run --passWithNoTests",
|
|
46
|
+
"test:watch": "vitest --watch",
|
|
47
|
+
"test:ui": "vitest --ui",
|
|
48
|
+
"test:coverage": "vitest --coverage",
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"lint": "eslint",
|
|
51
|
+
"format": "prettier --check . --ignore-path ../../.gitignore --ignore-path ../../.prettierignore"
|
|
52
|
+
},
|
|
53
|
+
"main": "./dist/index.cjs",
|
|
54
|
+
"module": "./dist/index.js",
|
|
55
|
+
"types": "./dist/index.d.ts"
|
|
56
|
+
}
|