@pistachiojs/core 0.1.0-dev.3 → 0.1.0-dev.4

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/dist/index.d.ts CHANGED
@@ -40,4 +40,11 @@ declare function toPascalCase(value: string): string;
40
40
  */
41
41
  declare function toSentenceCase(value: string): string;
42
42
 
43
- export { toCamelCase, toCapitalize, toKebabCase, toLowerCase, toPascalCase, toSentenceCase };
43
+ /**
44
+ * Converts a string to a URL-friendly slug.
45
+ * @param value - String value to slug.
46
+ * @returns String value slug.
47
+ */
48
+ declare function toSlug(value: string): string;
49
+
50
+ export { toCamelCase, toCapitalize, toKebabCase, toLowerCase, toPascalCase, toSentenceCase, toSlug };
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- function t(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(r,a)=>a?a.toUpperCase():"").replace(/^[A-Z]/,r=>r.toLowerCase())}function o(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function n(e){return e.length===0?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function s(e){return e.toLowerCase()}function c(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(r,a)=>a?a.toUpperCase():"").replace(/^[a-z]/,r=>r.toUpperCase())}function p(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}export{t as toCamelCase,o as toCapitalize,n as toKebabCase,s as toLowerCase,c as toPascalCase,p as toSentenceCase};
1
+ function t(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(r,a)=>a?a.toUpperCase():"").replace(/^[A-Z]/,r=>r.toLowerCase())}function o(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function n(e){return e.length===0?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function c(e){return e.toLowerCase()}function s(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(r,a)=>a?a.toUpperCase():"").replace(/^[a-z]/,r=>r.toUpperCase())}function l(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function p(e){return e.length===0?e:e.toLowerCase().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/^-+|-+$/g,"").replace(/-+/g,"-")}export{t as toCamelCase,o as toCapitalize,n as toKebabCase,c as toLowerCase,s as toPascalCase,l as toSentenceCase,p as toSlug};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";function r(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(a,t)=>t?t.toUpperCase():"").replace(/^[A-Z]/,a=>a.toLowerCase())}function o(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function s(e){return e.length===0?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function n(e){return e.toLowerCase()}function C(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(a,t)=>t?t.toUpperCase():"").replace(/^[a-z]/,a=>a.toUpperCase())}function c(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}exports.toCamelCase=r,exports.toCapitalize=o,exports.toKebabCase=s,exports.toLowerCase=n,exports.toPascalCase=C,exports.toSentenceCase=c;
1
+ "use strict";function r(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(a,t)=>t?t.toUpperCase():"").replace(/^[A-Z]/,a=>a.toLowerCase())}function o(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function n(e){return e.length===0?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function s(e){return e.toLowerCase()}function c(e){return e.length===0?e:e.replace(/[-_\s]+(.)?/g,(a,t)=>t?t.toUpperCase():"").replace(/^[a-z]/,a=>a.toUpperCase())}function l(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function C(e){return e.length===0?e:e.toLowerCase().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/^-+|-+$/g,"").replace(/-+/g,"-")}exports.toCamelCase=r,exports.toCapitalize=o,exports.toKebabCase=n,exports.toLowerCase=s,exports.toPascalCase=c,exports.toSentenceCase=l,exports.toSlug=C;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pistachiojs/core",
3
3
  "description": "-",
4
- "version": "0.1.0-dev.3",
4
+ "version": "0.1.0-dev.4",
5
5
  "author": "Dirga Prakesha <dirga.prakesha@gmail.com>",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
@@ -9,7 +9,9 @@
9
9
  "module": "dist/index.esm.js",
10
10
  "types": "dist/index.d.ts",
11
11
  "files": [
12
- "dist"
12
+ "dist/index.js",
13
+ "dist/index.esm.js",
14
+ "dist/index.d.ts"
13
15
  ],
14
16
  "scripts": {
15
17
  "build": "rollup -c ../../rollup.config.mjs --environment TARGET:core",
@@ -1 +0,0 @@
1
- export * from './strings';
@@ -1,6 +0,0 @@
1
- export * from './to-camel-case';
2
- export * from './to-capitalize';
3
- export * from './to-kebab-case';
4
- export * from './to-lower-case';
5
- export * from './to-pascal-case';
6
- export * from './to-sentence-case';
@@ -1,6 +0,0 @@
1
- /**
2
- * Converts a string to camel case.
3
- * @param value - String value to camel case.
4
- * @returns String value camel case.
5
- */
6
- export declare function toCamelCase(value: string): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * Converts a string to capitalize.
3
- * @param value - Value string to capitalize.
4
- * @returns Value string capitalize.
5
- */
6
- export declare function toCapitalize(value: string): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * Converts a string to kebab case.
3
- * @param value - String value to kebab case.
4
- * @returns String value kebab case.
5
- */
6
- export declare function toKebabCase(value: string): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * Converts a string to lower case.
3
- * @param value - String value to lower case.
4
- * @returns String value lower case.
5
- */
6
- export declare function toLowerCase(value: string): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * Converts a string to pascal case.
3
- * @param value - String value to pascal case.
4
- * @returns String value pascal case.
5
- */
6
- export declare function toPascalCase(value: string): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * Converts a string to sentence case.
3
- * @param value - String value to sentence case.
4
- * @returns String value sentence case.
5
- */
6
- export declare function toSentenceCase(value: string): string;