@prisma/client-common 6.12.0-dev.7 → 6.12.0-dev.8
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/casing.d.ts +6 -4
- package/dist/casing.js +7 -7
- package/dist/casing.mjs +6 -6
- package/dist/casing.test.js +6 -6
- package/dist/casing.test.mjs +7 -7
- package/package.json +5 -5
package/dist/casing.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export declare function capitalize(str: string): string;
|
|
2
1
|
/**
|
|
3
|
-
* Converts the first character of a word to
|
|
4
|
-
* @param name
|
|
2
|
+
* Converts the first character of a word to upper case.
|
|
5
3
|
*/
|
|
6
|
-
export declare function
|
|
4
|
+
export declare function capitalize<T extends string>(self: T): Capitalize<T>;
|
|
5
|
+
/**
|
|
6
|
+
* Converts the first character of a word to lower case.
|
|
7
|
+
*/
|
|
8
|
+
export declare function uncapitalize<T extends string>(self: T): Uncapitalize<T>;
|
package/dist/casing.js
CHANGED
|
@@ -19,18 +19,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var casing_exports = {};
|
|
20
20
|
__export(casing_exports, {
|
|
21
21
|
capitalize: () => capitalize,
|
|
22
|
-
|
|
22
|
+
uncapitalize: () => uncapitalize
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(casing_exports);
|
|
25
|
-
function capitalize(
|
|
26
|
-
if (
|
|
27
|
-
return
|
|
25
|
+
function capitalize(self) {
|
|
26
|
+
if (self.length === 0) return self;
|
|
27
|
+
return self[0].toUpperCase() + self.slice(1);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function uncapitalize(self) {
|
|
30
|
+
return self.substring(0, 1).toLowerCase() + self.substring(1);
|
|
31
31
|
}
|
|
32
32
|
// Annotate the CommonJS export names for ESM import in node:
|
|
33
33
|
0 && (module.exports = {
|
|
34
34
|
capitalize,
|
|
35
|
-
|
|
35
|
+
uncapitalize
|
|
36
36
|
});
|
package/dist/casing.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function capitalize(
|
|
2
|
-
if (
|
|
3
|
-
return
|
|
1
|
+
function capitalize(self) {
|
|
2
|
+
if (self.length === 0) return self;
|
|
3
|
+
return self[0].toUpperCase() + self.slice(1);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function uncapitalize(self) {
|
|
6
|
+
return self.substring(0, 1).toLowerCase() + self.substring(1);
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
9
|
capitalize,
|
|
10
|
-
|
|
10
|
+
uncapitalize
|
|
11
11
|
};
|
package/dist/casing.test.js
CHANGED
|
@@ -15,20 +15,20 @@ var import_casing = require("./casing");
|
|
|
15
15
|
(0, import_vitest.expect)((0, import_casing.capitalize)("Hello")).toBe("Hello");
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
(0, import_vitest.describe)("
|
|
18
|
+
(0, import_vitest.describe)("uncapitalize", () => {
|
|
19
19
|
(0, import_vitest.test)("empty", () => {
|
|
20
|
-
(0, import_vitest.expect)((0, import_casing.
|
|
20
|
+
(0, import_vitest.expect)((0, import_casing.uncapitalize)("")).toBe("");
|
|
21
21
|
});
|
|
22
22
|
(0, import_vitest.test)("single character", () => {
|
|
23
|
-
(0, import_vitest.expect)((0, import_casing.
|
|
23
|
+
(0, import_vitest.expect)((0, import_casing.uncapitalize)("A")).toBe("a");
|
|
24
24
|
});
|
|
25
25
|
(0, import_vitest.test)("multiple characters", () => {
|
|
26
|
-
(0, import_vitest.expect)((0, import_casing.
|
|
26
|
+
(0, import_vitest.expect)((0, import_casing.uncapitalize)("Hello")).toBe("hello");
|
|
27
27
|
});
|
|
28
28
|
(0, import_vitest.test)("does not modify already lower case string", () => {
|
|
29
|
-
(0, import_vitest.expect)((0, import_casing.
|
|
29
|
+
(0, import_vitest.expect)((0, import_casing.uncapitalize)("hello")).toBe("hello");
|
|
30
30
|
});
|
|
31
31
|
(0, import_vitest.test)("only lowercases the first character", () => {
|
|
32
|
-
(0, import_vitest.expect)((0, import_casing.
|
|
32
|
+
(0, import_vitest.expect)((0, import_casing.uncapitalize)("HelloWorld")).toBe("helloWorld");
|
|
33
33
|
});
|
|
34
34
|
});
|
package/dist/casing.test.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "vitest";
|
|
2
|
-
import { capitalize,
|
|
2
|
+
import { capitalize, uncapitalize } from "./casing";
|
|
3
3
|
describe("capitalize", () => {
|
|
4
4
|
test("empty", () => {
|
|
5
5
|
expect(capitalize("")).toBe("");
|
|
@@ -14,20 +14,20 @@ describe("capitalize", () => {
|
|
|
14
14
|
expect(capitalize("Hello")).toBe("Hello");
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
describe("
|
|
17
|
+
describe("uncapitalize", () => {
|
|
18
18
|
test("empty", () => {
|
|
19
|
-
expect(
|
|
19
|
+
expect(uncapitalize("")).toBe("");
|
|
20
20
|
});
|
|
21
21
|
test("single character", () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(uncapitalize("A")).toBe("a");
|
|
23
23
|
});
|
|
24
24
|
test("multiple characters", () => {
|
|
25
|
-
expect(
|
|
25
|
+
expect(uncapitalize("Hello")).toBe("hello");
|
|
26
26
|
});
|
|
27
27
|
test("does not modify already lower case string", () => {
|
|
28
|
-
expect(
|
|
28
|
+
expect(uncapitalize("hello")).toBe("hello");
|
|
29
29
|
});
|
|
30
30
|
test("only lowercases the first character", () => {
|
|
31
|
-
expect(
|
|
31
|
+
expect(uncapitalize("HelloWorld")).toBe("helloWorld");
|
|
32
32
|
});
|
|
33
33
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-common",
|
|
3
|
-
"version": "6.12.0-dev.
|
|
3
|
+
"version": "6.12.0-dev.8",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@prisma/
|
|
28
|
-
"@prisma/
|
|
29
|
-
"@prisma/
|
|
30
|
-
"@prisma/internals": "6.12.0-dev.
|
|
27
|
+
"@prisma/driver-adapter-utils": "6.12.0-dev.8",
|
|
28
|
+
"@prisma/generator": "6.12.0-dev.8",
|
|
29
|
+
"@prisma/dmmf": "6.12.0-dev.8",
|
|
30
|
+
"@prisma/internals": "6.12.0-dev.8"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"vitest": "3.0.9"
|