@twin.org/nameof 0.0.2-next.16 → 0.0.2-next.18
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/cjs/index.cjs +22 -0
- package/dist/esm/index.mjs +21 -1
- package/dist/types/index.d.ts +14 -0
- package/docs/changelog.md +28 -0
- package/docs/reference/functions/nameofCamelCase.md +31 -0
- package/docs/reference/functions/nameofKebabCase.md +31 -0
- package/docs/reference/index.md +2 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -12,5 +12,27 @@
|
|
|
12
12
|
function nameof(property, replaceParent) {
|
|
13
13
|
return "@twin.org/nameof-transformer is not in the build pipeline, you need to use a compiler that supports transformer plugins.";
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Placeholder method which substitutes the type name as a string at runtime.
|
|
17
|
+
* @param property The property to get the name of.
|
|
18
|
+
* @param replaceParent Optional object name to replace the top level object of a property path.
|
|
19
|
+
* @returns The type name as a string.
|
|
20
|
+
*/
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
|
+
function nameofKebabCase(property, replaceParent) {
|
|
23
|
+
return "@twin.org/nameof-transformer is not in the build pipeline, you need to use a compiler that supports transformer plugins.";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Placeholder method which substitutes the type name as a string at runtime.
|
|
27
|
+
* @param property The property to get the name of.
|
|
28
|
+
* @param replaceParent Optional object name to replace the top level object of a property path.
|
|
29
|
+
* @returns The type name as a string.
|
|
30
|
+
*/
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
32
|
+
function nameofCamelCase(property, replaceParent) {
|
|
33
|
+
return "@twin.org/nameof-transformer is not in the build pipeline, you need to use a compiler that supports transformer plugins.";
|
|
34
|
+
}
|
|
15
35
|
|
|
16
36
|
exports.nameof = nameof;
|
|
37
|
+
exports.nameofCamelCase = nameofCamelCase;
|
|
38
|
+
exports.nameofKebabCase = nameofKebabCase;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -10,5 +10,25 @@
|
|
|
10
10
|
function nameof(property, replaceParent) {
|
|
11
11
|
return "@twin.org/nameof-transformer is not in the build pipeline, you need to use a compiler that supports transformer plugins.";
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Placeholder method which substitutes the type name as a string at runtime.
|
|
15
|
+
* @param property The property to get the name of.
|
|
16
|
+
* @param replaceParent Optional object name to replace the top level object of a property path.
|
|
17
|
+
* @returns The type name as a string.
|
|
18
|
+
*/
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
|
+
function nameofKebabCase(property, replaceParent) {
|
|
21
|
+
return "@twin.org/nameof-transformer is not in the build pipeline, you need to use a compiler that supports transformer plugins.";
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Placeholder method which substitutes the type name as a string at runtime.
|
|
25
|
+
* @param property The property to get the name of.
|
|
26
|
+
* @param replaceParent Optional object name to replace the top level object of a property path.
|
|
27
|
+
* @returns The type name as a string.
|
|
28
|
+
*/
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
+
function nameofCamelCase(property, replaceParent) {
|
|
31
|
+
return "@twin.org/nameof-transformer is not in the build pipeline, you need to use a compiler that supports transformer plugins.";
|
|
32
|
+
}
|
|
13
33
|
|
|
14
|
-
export { nameof };
|
|
34
|
+
export { nameof, nameofCamelCase, nameofKebabCase };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,3 +5,17 @@
|
|
|
5
5
|
* @returns The type name as a string.
|
|
6
6
|
*/
|
|
7
7
|
export declare function nameof<T>(property?: unknown, replaceParent?: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Placeholder method which substitutes the type name as a string at runtime.
|
|
10
|
+
* @param property The property to get the name of.
|
|
11
|
+
* @param replaceParent Optional object name to replace the top level object of a property path.
|
|
12
|
+
* @returns The type name as a string.
|
|
13
|
+
*/
|
|
14
|
+
export declare function nameofKebabCase<T>(property?: unknown, replaceParent?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Placeholder method which substitutes the type name as a string at runtime.
|
|
17
|
+
* @param property The property to get the name of.
|
|
18
|
+
* @param replaceParent Optional object name to replace the top level object of a property path.
|
|
19
|
+
* @returns The type name as a string.
|
|
20
|
+
*/
|
|
21
|
+
export declare function nameofCamelCase<T>(property?: unknown, replaceParent?: string): string;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @twin.org/nameof - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.18](https://github.com/twinfoundation/framework/compare/nameof-v0.0.2-next.17...nameof-v0.0.2-next.18) (2025-09-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **nameof:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* devDependencies
|
|
15
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.17 to 0.0.2-next.18
|
|
16
|
+
|
|
17
|
+
## [0.0.2-next.17](https://github.com/twinfoundation/framework/compare/nameof-v0.0.2-next.16...nameof-v0.0.2-next.17) (2025-09-29)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* additional nameof operators ([a5aab60](https://github.com/twinfoundation/framework/commit/a5aab60bf66a86f1b7ff8af7c4f044cb03706d50))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* devDependencies
|
|
29
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.16 to 0.0.2-next.17
|
|
30
|
+
|
|
3
31
|
## [0.0.2-next.16](https://github.com/twinfoundation/framework/compare/nameof-v0.0.2-next.15...nameof-v0.0.2-next.16) (2025-09-28)
|
|
4
32
|
|
|
5
33
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: nameofCamelCase()
|
|
2
|
+
|
|
3
|
+
> **nameofCamelCase**\<`T`\>(`property?`, `replaceParent?`): `string`
|
|
4
|
+
|
|
5
|
+
Placeholder method which substitutes the type name as a string at runtime.
|
|
6
|
+
|
|
7
|
+
## Type Parameters
|
|
8
|
+
|
|
9
|
+
### T
|
|
10
|
+
|
|
11
|
+
`T`
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### property?
|
|
16
|
+
|
|
17
|
+
`unknown`
|
|
18
|
+
|
|
19
|
+
The property to get the name of.
|
|
20
|
+
|
|
21
|
+
### replaceParent?
|
|
22
|
+
|
|
23
|
+
`string`
|
|
24
|
+
|
|
25
|
+
Optional object name to replace the top level object of a property path.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The type name as a string.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: nameofKebabCase()
|
|
2
|
+
|
|
3
|
+
> **nameofKebabCase**\<`T`\>(`property?`, `replaceParent?`): `string`
|
|
4
|
+
|
|
5
|
+
Placeholder method which substitutes the type name as a string at runtime.
|
|
6
|
+
|
|
7
|
+
## Type Parameters
|
|
8
|
+
|
|
9
|
+
### T
|
|
10
|
+
|
|
11
|
+
`T`
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### property?
|
|
16
|
+
|
|
17
|
+
`unknown`
|
|
18
|
+
|
|
19
|
+
The property to get the name of.
|
|
20
|
+
|
|
21
|
+
### replaceParent?
|
|
22
|
+
|
|
23
|
+
`string`
|
|
24
|
+
|
|
25
|
+
Optional object name to replace the top level object of a property path.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The type name as a string.
|
package/docs/reference/index.md
CHANGED