typia 5.1.6 → 5.2.0
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/lib/CamelCase.d.ts +32 -0
- package/lib/CamelCase.js +3 -0
- package/lib/CamelCase.js.map +1 -0
- package/lib/PascalCase.d.ts +32 -0
- package/lib/PascalCase.js +3 -0
- package/lib/PascalCase.js.map +1 -0
- package/lib/Primitive.d.ts +1 -1
- package/lib/Resolved.d.ts +5 -5
- package/lib/SnakeCase.d.ts +34 -0
- package/lib/SnakeCase.js +3 -0
- package/lib/SnakeCase.js.map +1 -0
- package/lib/functional/$convention.d.ts +1 -0
- package/lib/functional/$convention.js +63 -0
- package/lib/functional/$convention.js.map +1 -0
- package/lib/functional/Namespace.js +9 -0
- package/lib/functional/Namespace.js.map +1 -1
- package/lib/module.d.ts +5 -1
- package/lib/module.js +6 -2
- package/lib/module.js.map +1 -1
- package/lib/notations.d.ts +538 -0
- package/lib/notations.js +146 -0
- package/lib/notations.js.map +1 -0
- package/lib/programmers/helpers/NotationJoiner.d.ts +7 -0
- package/lib/programmers/helpers/NotationJoiner.js +85 -0
- package/lib/programmers/helpers/NotationJoiner.js.map +1 -0
- package/lib/programmers/misc/MiscCloneProgrammer.js +12 -1
- package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscPruneProgrammer.js +2 -1
- package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.d.ts +5 -0
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js +44 -0
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js.map +1 -0
- package/lib/programmers/notations/NotationGeneralProgrammer.d.ts +6 -0
- package/lib/programmers/notations/NotationGeneralProgrammer.js +490 -0
- package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -0
- package/lib/programmers/notations/NotationIsGeneralProgrammer.d.ts +5 -0
- package/lib/programmers/notations/NotationIsGeneralProgrammer.js +47 -0
- package/lib/programmers/notations/NotationIsGeneralProgrammer.js.map +1 -0
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.d.ts +5 -0
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.js +44 -0
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.js.map +1 -0
- package/lib/transformers/CallExpressionTransformer.js +99 -16
- package/lib/transformers/CallExpressionTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonAssertParseTransformer.js +1 -1
- package/lib/transformers/features/json/JsonAssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonAssertStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonAssertStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateAssertParseTransformer.js +1 -1
- package/lib/transformers/features/json/JsonCreateAssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateAssertStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonCreateAssertStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateIsParseTransformer.js +1 -1
- package/lib/transformers/features/json/JsonCreateIsParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateIsStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonCreateIsStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonCreateStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateValidateParseTransformer.js +1 -1
- package/lib/transformers/features/json/JsonCreateValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateValidateStringifyProgrammer.js +1 -1
- package/lib/transformers/features/json/JsonCreateValidateStringifyProgrammer.js.map +1 -1
- package/lib/transformers/features/json/JsonIsParseTransformer.js +1 -1
- package/lib/transformers/features/json/JsonIsParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonIsStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonIsStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonValidateParseTransformer.js +1 -1
- package/lib/transformers/features/json/JsonValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonValidateStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonValidateStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscAssertCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscAssertCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscAssertPruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscAssertPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateAssertCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreateAssertCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateAssertPruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreateAssertPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateIsCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreateIsCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateIsPruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreateIsPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreatePruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateValidateCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreateValidateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateValidatePruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscCreateValidatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscIsCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscIsCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscIsPruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscIsPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscPruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscValidateCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscValidateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscValidatePruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscValidatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationAssertGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationAssertGeneralTransformer.js +15 -0
- package/lib/transformers/features/notations/NotationAssertGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/notations/NotationCreateAssertGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationCreateAssertGeneralTransformer.js +15 -0
- package/lib/transformers/features/notations/NotationCreateAssertGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/notations/NotationCreateGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationCreateGeneralTransformer.js +15 -0
- package/lib/transformers/features/notations/NotationCreateGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/notations/NotationCreateIsGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationCreateIsGeneralTransformer.js +15 -0
- package/lib/transformers/features/notations/NotationCreateIsGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/notations/NotationCreateValidateGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationCreateValidateGeneralTransformer.js +15 -0
- package/lib/transformers/features/notations/NotationCreateValidateGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/notations/NotationGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationGeneralTransformer.js +14 -0
- package/lib/transformers/features/notations/NotationGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/notations/NotationIsGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationIsGeneralTransformer.js +15 -0
- package/lib/transformers/features/notations/NotationIsGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/notations/NotationValidateGeneralTransformer.d.ts +4 -0
- package/lib/transformers/features/notations/NotationValidateGeneralTransformer.js +15 -0
- package/lib/transformers/features/notations/NotationValidateGeneralTransformer.js.map +1 -0
- package/lib/transformers/features/protobuf/{CreateProtobufAssertDecodeTransformer.d.ts → ProtobufCreateAssertDecodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufAssertDecodeTransformer.js → ProtobufCreateAssertDecodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufAssertEncodeTransformer.js.map → ProtobufCreateAssertDecodeTransformer.js.map} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufAssertEncodeTransformer.d.ts → ProtobufCreateAssertEncodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufAssertEncodeTransformer.js → ProtobufCreateAssertEncodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufAssertDecodeTransformer.js.map → ProtobufCreateAssertEncodeTransformer.js.map} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufDecodeTransformer.d.ts → ProtobufCreateDecodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufDecodeTransformer.js → ProtobufCreateDecodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufDecodeTransformer.js.map → ProtobufCreateDecodeTransformer.js.map} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufEncodeTransformer.d.ts → ProtobufCreateEncodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufEncodeTransformer.js → ProtobufCreateEncodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufEncodeTransformer.js.map → ProtobufCreateEncodeTransformer.js.map} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufIsDecodeTransformer.d.ts → ProtobufCreateIsDecodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufIsDecodeTransformer.js → ProtobufCreateIsDecodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufIsDecodeTransformer.js.map → ProtobufCreateIsDecodeTransformer.js.map} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufIsEncodeTransformer.d.ts → ProtobufCreateIsEncodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufIsEncodeTransformer.js → ProtobufCreateIsEncodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufIsEncodeTransformer.js.map → ProtobufCreateIsEncodeTransformer.js.map} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufValidateDecodeTransformer.d.ts → ProtobufCreateValidateDecodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufValidateDecodeTransformer.js → ProtobufCreateValidateDecodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufValidateDecodeTransformer.js.map → ProtobufCreateValidateDecodeTransformer.js.map} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufValidateEncodeTransformer.d.ts → ProtobufCreateValidateEncodeTransformer.d.ts} +1 -1
- package/lib/transformers/features/protobuf/{CreateProtobufValidateEncodeTransformer.js → ProtobufCreateValidateEncodeTransformer.js} +6 -6
- package/lib/transformers/features/protobuf/{CreateProtobufValidateEncodeTransformer.js.map → ProtobufCreateValidateEncodeTransformer.js.map} +1 -1
- package/lib/utils/NamingConvention.d.ts +5 -0
- package/lib/utils/NamingConvention.js +115 -0
- package/lib/utils/NamingConvention.js.map +1 -0
- package/lib/utils/StringUtil.d.ts +3 -0
- package/lib/utils/StringUtil.js +10 -0
- package/lib/utils/StringUtil.js.map +1 -0
- package/package.json +2 -1
- package/src/CamelCase.ts +116 -0
- package/src/PascalCase.ts +116 -0
- package/src/Primitive.ts +135 -135
- package/src/Resolved.ts +116 -116
- package/src/SnakeCase.ts +156 -0
- package/src/functional/$convention.ts +40 -0
- package/src/functional/Namespace.ts +164 -142
- package/src/module.ts +662 -657
- package/src/notations.ts +855 -0
- package/src/programmers/helpers/NotationJoiner.ts +146 -0
- package/src/programmers/misc/MiscCloneProgrammer.ts +790 -774
- package/src/programmers/misc/MiscPruneProgrammer.ts +552 -550
- package/src/programmers/notations/NotationAssertGeneralProgrammer.ts +72 -0
- package/src/programmers/notations/NotationGeneralProgrammer.ts +720 -0
- package/src/programmers/notations/NotationIsGeneralProgrammer.ts +79 -0
- package/src/programmers/notations/NotationValidateGeneralProgrammer.ts +88 -0
- package/src/transformers/CallExpressionTransformer.ts +380 -289
- package/src/transformers/features/json/JsonAssertParseTransformer.ts +10 -10
- package/src/transformers/features/json/JsonAssertStringifyTransformer.ts +10 -10
- package/src/transformers/features/json/JsonCreateAssertParseTransformer.ts +12 -10
- package/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts +12 -12
- package/src/transformers/features/json/JsonCreateIsParseTransformer.ts +9 -9
- package/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +12 -10
- package/src/transformers/features/json/JsonCreateStringifyTransformer.ts +9 -9
- package/src/transformers/features/json/JsonCreateValidateParseTransformer.ts +12 -10
- package/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts +12 -12
- package/src/transformers/features/json/JsonIsParseTransformer.ts +9 -9
- package/src/transformers/features/json/JsonIsStringifyTransformer.ts +10 -10
- package/src/transformers/features/json/JsonStringifyTransformer.ts +9 -9
- package/src/transformers/features/json/JsonValidateParseTransformer.ts +10 -10
- package/src/transformers/features/json/JsonValidateStringifyTransformer.ts +10 -10
- package/src/transformers/features/misc/MiscAssertCloneTransformer.ts +10 -10
- package/src/transformers/features/misc/MiscAssertPruneTransformer.ts +10 -10
- package/src/transformers/features/misc/MiscCloneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts +12 -10
- package/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts +12 -10
- package/src/transformers/features/misc/MiscCreateCloneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscCreatePruneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts +12 -10
- package/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts +12 -10
- package/src/transformers/features/misc/MiscIsCloneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscIsPruneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscPruneTransformer.ts +9 -9
- package/src/transformers/features/misc/MiscValidateCloneTransformer.ts +10 -10
- package/src/transformers/features/misc/MiscValidatePruneTransformer.ts +10 -10
- package/src/transformers/features/notations/NotationAssertGeneralTransformer.ts +15 -0
- package/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts +15 -0
- package/src/transformers/features/notations/NotationCreateGeneralTransformer.ts +15 -0
- package/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts +15 -0
- package/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts +17 -0
- package/src/transformers/features/notations/NotationGeneralTransformer.ts +11 -0
- package/src/transformers/features/notations/NotationIsGeneralTransformer.ts +15 -0
- package/src/transformers/features/notations/NotationValidateGeneralTransformer.ts +17 -0
- package/src/transformers/features/protobuf/{CreateProtobufAssertDecodeTransformer.ts → ProtobufCreateAssertDecodeTransformer.ts} +12 -12
- package/src/transformers/features/protobuf/{CreateProtobufAssertEncodeTransformer.ts → ProtobufCreateAssertEncodeTransformer.ts} +12 -12
- package/src/transformers/features/protobuf/{CreateProtobufDecodeTransformer.ts → ProtobufCreateDecodeTransformer.ts} +9 -9
- package/src/transformers/features/protobuf/{CreateProtobufEncodeTransformer.ts → ProtobufCreateEncodeTransformer.ts} +9 -9
- package/src/transformers/features/protobuf/{CreateProtobufIsDecodeTransformer.ts → ProtobufCreateIsDecodeTransformer.ts} +12 -12
- package/src/transformers/features/protobuf/{CreateProtobufIsEncodeTransformer.ts → ProtobufCreateIsEncodeTransformer.ts} +12 -12
- package/src/transformers/features/protobuf/{CreateProtobufValidateDecodeTransformer.ts → ProtobufCreateValidateDecodeTransformer.ts} +12 -12
- package/src/transformers/features/protobuf/{CreateProtobufValidateEncodeTransformer.ts → ProtobufCreateValidateEncodeTransformer.ts} +12 -12
- package/src/utils/NamingConvention.ts +91 -0
- package/src/utils/StringUtil.ts +4 -0
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
import { CamelCase } from "./CamelCase";
|
|
2
|
+
import { IValidation } from "./IValidation";
|
|
3
|
+
import { PascalCase } from "./PascalCase";
|
|
4
|
+
import { SnakeCase } from "./SnakeCase";
|
|
5
|
+
/**
|
|
6
|
+
* Convert to camel case.
|
|
7
|
+
*
|
|
8
|
+
* Convert every property names of nested objects to follow the camel case convention.
|
|
9
|
+
*
|
|
10
|
+
* For reference, this `typia.notations.camel()` function does not validate the input value
|
|
11
|
+
* type. It just believes that the input value is following the type `T`. Therefore,
|
|
12
|
+
* if you can't ensure the input value type, it would be better to call one of them below:
|
|
13
|
+
*
|
|
14
|
+
* - {@link assertCamel}
|
|
15
|
+
* - {@link isCamel}
|
|
16
|
+
* - {@link validateCamel}
|
|
17
|
+
*
|
|
18
|
+
* @template T Type of the input value
|
|
19
|
+
* @param input Target object
|
|
20
|
+
* @returns Camel case object
|
|
21
|
+
*
|
|
22
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
23
|
+
*/
|
|
24
|
+
export declare function camel<T>(input: T): CamelCase<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Converts to camel case with type assertion.
|
|
27
|
+
*
|
|
28
|
+
* Convert every property names of nested objects to follow the camel case convention.
|
|
29
|
+
* If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
|
|
30
|
+
*
|
|
31
|
+
* @template T Type of the input value
|
|
32
|
+
* @param input Target object
|
|
33
|
+
* @returns Camel case object
|
|
34
|
+
*
|
|
35
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
36
|
+
*/
|
|
37
|
+
export declare function assertCamel<T>(input: T): CamelCase<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Converts to camel case with type assertion.
|
|
40
|
+
*
|
|
41
|
+
* Convert every property names of nested objects to follow the camel case convention.
|
|
42
|
+
* If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
|
|
43
|
+
*
|
|
44
|
+
* @template T Type of the input value
|
|
45
|
+
* @param input Target object
|
|
46
|
+
* @returns Camel case object
|
|
47
|
+
*
|
|
48
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
49
|
+
*/
|
|
50
|
+
export declare function assertCamel<T>(input: unknown): CamelCase<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Converts to camel case with type checking.
|
|
53
|
+
*
|
|
54
|
+
* Convert every property names of nested objects to follow the camel case convention.
|
|
55
|
+
* If the input value does not follow the type `T`, it returns `null` value instead.
|
|
56
|
+
*
|
|
57
|
+
* @template T Type of the input value
|
|
58
|
+
* @param input Target object
|
|
59
|
+
* @returns Camel case object when exact type, otherwise null
|
|
60
|
+
*
|
|
61
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
62
|
+
*/
|
|
63
|
+
export declare function isCamel<T>(input: T): CamelCase<T> | null;
|
|
64
|
+
/**
|
|
65
|
+
* Converts to camel case with type checking.
|
|
66
|
+
*
|
|
67
|
+
* Convert every property names of nested objects to follow the camel case convention.
|
|
68
|
+
* If the input value does not follow the type `T`, it returns `null` value instead.
|
|
69
|
+
*
|
|
70
|
+
* @template T Type of the input value
|
|
71
|
+
* @param input Target object
|
|
72
|
+
* @returns Camel case object when exact type, otherwise null
|
|
73
|
+
*
|
|
74
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
75
|
+
*/
|
|
76
|
+
export declare function isCamel<T>(input: unknown): CamelCase<T> | null;
|
|
77
|
+
/**
|
|
78
|
+
* Converts to camel case with type validation.
|
|
79
|
+
*
|
|
80
|
+
* Convert every property names of nested objects to follow the camel case convention.
|
|
81
|
+
* If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
|
|
82
|
+
* object. Otherwise, there's no problem on the input value, camel cased converted data
|
|
83
|
+
* would be stored in the `data` property of the output {@link IValidation.Success} object.
|
|
84
|
+
*
|
|
85
|
+
* @template T Type of the input value
|
|
86
|
+
* @param input Target object
|
|
87
|
+
* @returns Validation result with camel case object
|
|
88
|
+
*
|
|
89
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
90
|
+
*/
|
|
91
|
+
export declare function validateCamel<T>(input: T): IValidation<CamelCase<T>>;
|
|
92
|
+
/**
|
|
93
|
+
* Converts to camel case with type validation.
|
|
94
|
+
*
|
|
95
|
+
* Convert every property names of nested objects to follow the camel case convention.
|
|
96
|
+
* If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
|
|
97
|
+
* object. Otherwise, there's no problem on the input value, camel cased converted data
|
|
98
|
+
* would be stored in the `data` property of the output {@link IValidation.Success} object.
|
|
99
|
+
*
|
|
100
|
+
* @template T Type of the input value
|
|
101
|
+
* @param input Target object
|
|
102
|
+
* @returns Validation result with camel case object
|
|
103
|
+
*
|
|
104
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
105
|
+
*/
|
|
106
|
+
export declare function validateCamel<T>(input: unknown): IValidation<CamelCase<T>>;
|
|
107
|
+
/**
|
|
108
|
+
* Convert to pascal case.
|
|
109
|
+
*
|
|
110
|
+
* Convert every property names of nested objects to follow the pascal case convention.
|
|
111
|
+
*
|
|
112
|
+
* For reference, this `typia.notations.pascal()` function does not validate the input value
|
|
113
|
+
* type. It just believes that the input value is following the type `T`. Therefore,
|
|
114
|
+
* if you can't ensure the input value type, it would be better to call one of them below:
|
|
115
|
+
*
|
|
116
|
+
* - {@link assertPascal}
|
|
117
|
+
* - {@link isPascal}
|
|
118
|
+
* - {@link validatePascal}
|
|
119
|
+
*
|
|
120
|
+
* @template T Type of the input value
|
|
121
|
+
* @param input Target object
|
|
122
|
+
* @returns Pascal case object
|
|
123
|
+
*
|
|
124
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
125
|
+
*/
|
|
126
|
+
export declare function pascal<T>(input: T): PascalCase<T>;
|
|
127
|
+
/**
|
|
128
|
+
* Converts to pascal case with type assertion.
|
|
129
|
+
*
|
|
130
|
+
* Convert every property names of nested objects to follow the pascal case convention.
|
|
131
|
+
* If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
|
|
132
|
+
*
|
|
133
|
+
* @template T Type of the input value
|
|
134
|
+
* @param input Target object
|
|
135
|
+
* @returns Pascal case object
|
|
136
|
+
*
|
|
137
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
138
|
+
*/
|
|
139
|
+
export declare function assertPascal<T>(input: T): PascalCase<T>;
|
|
140
|
+
/**
|
|
141
|
+
* Converts to pascal case with type assertion.
|
|
142
|
+
*
|
|
143
|
+
* Convert every property names of nested objects to follow the pascal case convention.
|
|
144
|
+
* If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
|
|
145
|
+
*
|
|
146
|
+
* @template T Type of the input value
|
|
147
|
+
* @param input Target object
|
|
148
|
+
* @returns Pascal case object
|
|
149
|
+
*
|
|
150
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
151
|
+
*/
|
|
152
|
+
export declare function assertPascal<T>(input: unknown): PascalCase<T>;
|
|
153
|
+
/**
|
|
154
|
+
* Converts to pascal case with type checking.
|
|
155
|
+
*
|
|
156
|
+
* Convert every property names of nested objects to follow the pascal case convention.
|
|
157
|
+
* If the input value does not follow the type `T`, it returns `null` value instead.
|
|
158
|
+
*
|
|
159
|
+
* @template T Type of the input value
|
|
160
|
+
* @param input Target object
|
|
161
|
+
* @returns Pascal case object when exact type, otherwise null
|
|
162
|
+
*
|
|
163
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
164
|
+
*/
|
|
165
|
+
export declare function isPascal<T>(input: T): PascalCase<T> | null;
|
|
166
|
+
/**
|
|
167
|
+
* Converts to pascal case with type checking.
|
|
168
|
+
*
|
|
169
|
+
* Convert every property names of nested objects to follow the pascal case convention.
|
|
170
|
+
* If the input value does not follow the type `T`, it returns `null` value instead.
|
|
171
|
+
*
|
|
172
|
+
* @template T Type of the input value
|
|
173
|
+
* @param input Target object
|
|
174
|
+
* @returns Pascal case object when exact type, otherwise null
|
|
175
|
+
*
|
|
176
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
177
|
+
*/
|
|
178
|
+
export declare function isPascal<T>(input: unknown): PascalCase<T> | null;
|
|
179
|
+
/**
|
|
180
|
+
* Converts to pascal case with type validation.
|
|
181
|
+
*
|
|
182
|
+
* Convert every property names of nested objects to follow the pascal case convention.
|
|
183
|
+
* If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
|
|
184
|
+
* object. Otherwise, there's no problem on the input value, pascal cased converted data
|
|
185
|
+
* would be stored in the `data` property of the output {@link IValidation.Success} object.
|
|
186
|
+
*
|
|
187
|
+
* @template T Type of the input value
|
|
188
|
+
* @param input Target object
|
|
189
|
+
* @returns Validation result with pascal case object
|
|
190
|
+
*
|
|
191
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
192
|
+
*/
|
|
193
|
+
export declare function validatePascal<T>(input: T): IValidation<PascalCase<T>>;
|
|
194
|
+
/**
|
|
195
|
+
* Converts to pascal case with type validation.
|
|
196
|
+
*
|
|
197
|
+
* Convert every property names of nested objects to follow the pascal case convention.
|
|
198
|
+
* If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
|
|
199
|
+
* object. Otherwise, there's no problem on the input value, pascal cased converted data
|
|
200
|
+
* would be stored in the `data` property of the output {@link IValidation.Success} object.
|
|
201
|
+
*
|
|
202
|
+
* @template T Type of the input value
|
|
203
|
+
* @param input Target object
|
|
204
|
+
* @returns Validation result with pascal case object
|
|
205
|
+
*
|
|
206
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
207
|
+
*/
|
|
208
|
+
export declare function validatePascal<T>(input: unknown): IValidation<PascalCase<T>>;
|
|
209
|
+
/**
|
|
210
|
+
* Convert to snake case.
|
|
211
|
+
*
|
|
212
|
+
* Convert every property names of nested objects to follow the snake case convention.
|
|
213
|
+
*
|
|
214
|
+
* For reference, this `typia.notations.snake()` function does not validate the input value
|
|
215
|
+
* type. It just believes that the input value is following the type `T`. Therefore,
|
|
216
|
+
* if you can't ensure the input value type, it would be better to call one of them below:
|
|
217
|
+
*
|
|
218
|
+
* - {@link assertSnake}
|
|
219
|
+
* - {@link isSnake}
|
|
220
|
+
* - {@link validateSnake}
|
|
221
|
+
*
|
|
222
|
+
* @template T Type of the input value
|
|
223
|
+
* @param input Target object
|
|
224
|
+
* @returns Snake case object
|
|
225
|
+
*
|
|
226
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
227
|
+
*/
|
|
228
|
+
export declare function snake<T>(input: T): SnakeCase<T>;
|
|
229
|
+
/**
|
|
230
|
+
* Converts to snake case with type assertion.
|
|
231
|
+
*
|
|
232
|
+
* Convert every property names of nested objects to follow the snake case convention.
|
|
233
|
+
* If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
|
|
234
|
+
*
|
|
235
|
+
* @template T Type of the input value
|
|
236
|
+
* @param input Target object
|
|
237
|
+
* @returns Snake case object
|
|
238
|
+
*
|
|
239
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
240
|
+
*/
|
|
241
|
+
export declare function assertSnake<T>(input: T): SnakeCase<T>;
|
|
242
|
+
/**
|
|
243
|
+
* Converts to snake case with type assertion.
|
|
244
|
+
*
|
|
245
|
+
* Convert every property names of nested objects to follow the snake case convention.
|
|
246
|
+
* If the input value does not follow the type `T`, it throws {@link TypeGuardError}.
|
|
247
|
+
*
|
|
248
|
+
* @template T Type of the input value
|
|
249
|
+
* @param input Target object
|
|
250
|
+
* @returns Snake case object
|
|
251
|
+
*
|
|
252
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
253
|
+
*/
|
|
254
|
+
export declare function assertSnake<T>(input: unknown): SnakeCase<T>;
|
|
255
|
+
/**
|
|
256
|
+
* Converts to snake case with type checking.
|
|
257
|
+
*
|
|
258
|
+
* Convert every property names of nested objects to follow the snake case convention.
|
|
259
|
+
* If the input value does not follow the type `T`, it returns `null` value instead.
|
|
260
|
+
*
|
|
261
|
+
* @template T Type of the input value
|
|
262
|
+
* @param input Target object
|
|
263
|
+
* @returns Snake case object when exact type, otherwise null
|
|
264
|
+
*
|
|
265
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
266
|
+
*/
|
|
267
|
+
export declare function isSnake<T>(input: T): SnakeCase<T> | null;
|
|
268
|
+
/**
|
|
269
|
+
* Converts to snake case with type checking.
|
|
270
|
+
*
|
|
271
|
+
* Convert every property names of nested objects to follow the snake case convention.
|
|
272
|
+
* If the input value does not follow the type `T`, it returns `null` value instead.
|
|
273
|
+
*
|
|
274
|
+
* @template T Type of the input value
|
|
275
|
+
* @param input Target object
|
|
276
|
+
* @returns Snake case object when exact type, otherwise null
|
|
277
|
+
*
|
|
278
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
279
|
+
*/
|
|
280
|
+
export declare function isSnake<T>(input: unknown): SnakeCase<T> | null;
|
|
281
|
+
/**
|
|
282
|
+
* Converts to snake case with type validation.
|
|
283
|
+
*
|
|
284
|
+
* Convert every property names of nested objects to follow the snake case convention.
|
|
285
|
+
* If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
|
|
286
|
+
* object. Otherwise, there's no problem on the input value, snake cased converted data
|
|
287
|
+
* would be stored in the `data` property of the output {@link IValidation.Success} object.
|
|
288
|
+
*
|
|
289
|
+
* @template T Type of the input value
|
|
290
|
+
* @param input Target object
|
|
291
|
+
* @returns Validation result with snake case object
|
|
292
|
+
*
|
|
293
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
294
|
+
*/
|
|
295
|
+
export declare function validateSnake<T>(input: T): IValidation<SnakeCase<T>>;
|
|
296
|
+
/**
|
|
297
|
+
* Converts to snake case with type validation.
|
|
298
|
+
*
|
|
299
|
+
* Convert every property names of nested objects to follow the snake case convention.
|
|
300
|
+
* If the input value does not follow the type `T`, it returns {@link IValidation.Failure}
|
|
301
|
+
* object. Otherwise, there's no problem on the input value, snake cased converted data
|
|
302
|
+
* would be stored in the `data` property of the output {@link IValidation.Success} object.
|
|
303
|
+
*
|
|
304
|
+
* @template T Type of the input value
|
|
305
|
+
* @param input Target object
|
|
306
|
+
* @returns Validation result with snake case object
|
|
307
|
+
*
|
|
308
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
309
|
+
*/
|
|
310
|
+
export declare function validateSnake<T>(input: unknown): IValidation<SnakeCase<T>>;
|
|
311
|
+
/**
|
|
312
|
+
* Creates a reusable {@link camel} function.
|
|
313
|
+
*
|
|
314
|
+
* @danger You must configure the generic argument `T`
|
|
315
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
316
|
+
* @throws compile error
|
|
317
|
+
*
|
|
318
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
319
|
+
*/
|
|
320
|
+
export declare function createCamel(): never;
|
|
321
|
+
/**
|
|
322
|
+
* Creates a reusable {@link camel} function.
|
|
323
|
+
*
|
|
324
|
+
* @template T Type of the input value
|
|
325
|
+
* @returns A reusable `camel` function
|
|
326
|
+
*
|
|
327
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
328
|
+
*/
|
|
329
|
+
export declare function createCamel<T>(): (input: T) => CamelCase<T>;
|
|
330
|
+
/**
|
|
331
|
+
* Creates a reusable {@link assertCamel} function.
|
|
332
|
+
*
|
|
333
|
+
* @danger You must configure the generic argument `T`
|
|
334
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
335
|
+
* @throws compile error
|
|
336
|
+
*
|
|
337
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
338
|
+
*/
|
|
339
|
+
export declare function createAssertCamel(): never;
|
|
340
|
+
/**
|
|
341
|
+
* Creates a reusable {@link assertCamel} function.
|
|
342
|
+
*
|
|
343
|
+
* @template T Type of the input value
|
|
344
|
+
* @returns A reusable `assertCamel` function
|
|
345
|
+
*
|
|
346
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
347
|
+
*/
|
|
348
|
+
export declare function createAssertCamel<T>(): (input: T) => CamelCase<T>;
|
|
349
|
+
/**
|
|
350
|
+
* Creates a reusable {@link isCamel} function.
|
|
351
|
+
*
|
|
352
|
+
* @danger You must configure the generic argument `T`
|
|
353
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
354
|
+
* @throws compile error
|
|
355
|
+
*
|
|
356
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
357
|
+
*/
|
|
358
|
+
export declare function createIsCamel(): never;
|
|
359
|
+
/**
|
|
360
|
+
* Creates a reusable {@link isCamel} function.
|
|
361
|
+
*
|
|
362
|
+
* @template T Type of the input value
|
|
363
|
+
* @returns A reusable `isCamel` function
|
|
364
|
+
*
|
|
365
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
366
|
+
*/
|
|
367
|
+
export declare function createIsCamel<T>(): (input: T) => CamelCase<T> | null;
|
|
368
|
+
/**
|
|
369
|
+
* Creates a reusable {@link validateCamel} function.
|
|
370
|
+
*
|
|
371
|
+
* @danger You must configure the generic argument `T`
|
|
372
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
373
|
+
* @throws compile error
|
|
374
|
+
*
|
|
375
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
376
|
+
*/
|
|
377
|
+
export declare function createValidateCamel(): never;
|
|
378
|
+
/**
|
|
379
|
+
* Creates a reusable {@link validateCamel} function.
|
|
380
|
+
*
|
|
381
|
+
* @template T Type of the input value
|
|
382
|
+
* @returns A reusable `validateCamel` function
|
|
383
|
+
*
|
|
384
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
385
|
+
*/
|
|
386
|
+
export declare function createValidateCamel<T>(): (input: T) => IValidation<CamelCase<T>>;
|
|
387
|
+
/**
|
|
388
|
+
* Creates a reusable {@link pascal} function.
|
|
389
|
+
*
|
|
390
|
+
* @danger You must configure the generic argument `T`
|
|
391
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
392
|
+
* @throws compile error
|
|
393
|
+
*
|
|
394
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
395
|
+
*/
|
|
396
|
+
export declare function createPascal(): never;
|
|
397
|
+
/**
|
|
398
|
+
* Creates a reusable {@link pascal} function.
|
|
399
|
+
*
|
|
400
|
+
* @template T Type of the input value
|
|
401
|
+
* @returns A reusable `pascal` function
|
|
402
|
+
*
|
|
403
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
404
|
+
*/
|
|
405
|
+
export declare function createPascal<T>(): (input: T) => PascalCase<T>;
|
|
406
|
+
/**
|
|
407
|
+
* Creates a reusable {@link assertPascal} function.
|
|
408
|
+
*
|
|
409
|
+
* @danger You must configure the generic argument `T`
|
|
410
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
411
|
+
* @throws compile error
|
|
412
|
+
*
|
|
413
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
414
|
+
*/
|
|
415
|
+
export declare function createAssertPascal(): never;
|
|
416
|
+
/**
|
|
417
|
+
* Creates a reusable {@link assertPascal} function.
|
|
418
|
+
*
|
|
419
|
+
* @template T Type of the input value
|
|
420
|
+
* @returns A reusable `assertPascal` function
|
|
421
|
+
*
|
|
422
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
423
|
+
*/
|
|
424
|
+
export declare function createAssertPascal<T>(): (input: T) => PascalCase<T>;
|
|
425
|
+
/**
|
|
426
|
+
* Creates a reusable {@link isPascal} function.
|
|
427
|
+
*
|
|
428
|
+
* @danger You must configure the generic argument `T`
|
|
429
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
430
|
+
* @throws compile error
|
|
431
|
+
*
|
|
432
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
433
|
+
*/
|
|
434
|
+
export declare function createIsPascal(): never;
|
|
435
|
+
/**
|
|
436
|
+
* Creates a reusable {@link isPascal} function.
|
|
437
|
+
*
|
|
438
|
+
* @template T Type of the input value
|
|
439
|
+
* @returns A reusable `isPascal` function
|
|
440
|
+
*
|
|
441
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
442
|
+
*/
|
|
443
|
+
export declare function createIsPascal<T>(): (input: T) => PascalCase<T> | null;
|
|
444
|
+
/**
|
|
445
|
+
* Creates a reusable {@link validatePascal} function.
|
|
446
|
+
*
|
|
447
|
+
* @danger You must configure the generic argument `T`
|
|
448
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
449
|
+
* @throws compile error
|
|
450
|
+
*
|
|
451
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
452
|
+
*/
|
|
453
|
+
export declare function createValidatePascal(): never;
|
|
454
|
+
/**
|
|
455
|
+
* Creates a reusable {@link validatePascal} function.
|
|
456
|
+
*
|
|
457
|
+
* @template T Type of the input value
|
|
458
|
+
* @returns A reusable `validatePascal` function
|
|
459
|
+
*
|
|
460
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
461
|
+
*/
|
|
462
|
+
export declare function createValidatePascal<T>(): (input: T) => IValidation<PascalCase<T>>;
|
|
463
|
+
/**
|
|
464
|
+
* Creates a reusable {@link snake} function.
|
|
465
|
+
*
|
|
466
|
+
* @danger You must configure the generic argument `T`
|
|
467
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
468
|
+
* @throws compile error
|
|
469
|
+
*
|
|
470
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
471
|
+
*/
|
|
472
|
+
export declare function createSnake(): never;
|
|
473
|
+
/**
|
|
474
|
+
* Creates a reusable {@link snake} function.
|
|
475
|
+
*
|
|
476
|
+
* @template T Type of the input value
|
|
477
|
+
* @returns A reusable `snake` function
|
|
478
|
+
*
|
|
479
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
480
|
+
*/
|
|
481
|
+
export declare function createSnake<T>(): (input: T) => SnakeCase<T>;
|
|
482
|
+
/**
|
|
483
|
+
* Creates a reusable {@link assertSnake} function.
|
|
484
|
+
*
|
|
485
|
+
* @danger You must configure the generic argument `T`
|
|
486
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
487
|
+
* @throws compile error
|
|
488
|
+
*
|
|
489
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
490
|
+
*/
|
|
491
|
+
export declare function createAssertSnake(): never;
|
|
492
|
+
/**
|
|
493
|
+
* Creates a reusable {@link assertSnake} function.
|
|
494
|
+
*
|
|
495
|
+
* @template T Type of the input value
|
|
496
|
+
* @returns A reusable `assertSnake` function
|
|
497
|
+
*
|
|
498
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
499
|
+
*/
|
|
500
|
+
export declare function createAssertSnake<T>(): (input: T) => SnakeCase<T>;
|
|
501
|
+
/**
|
|
502
|
+
* Creates a reusable {@link isSnake} function.
|
|
503
|
+
*
|
|
504
|
+
* @danger You must configure the generic argument `T`
|
|
505
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
506
|
+
* @throws compile error
|
|
507
|
+
*
|
|
508
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
509
|
+
*/
|
|
510
|
+
export declare function createIsSnake(): never;
|
|
511
|
+
/**
|
|
512
|
+
* Creates a reusable {@link isSnake} function.
|
|
513
|
+
*
|
|
514
|
+
* @template T Type of the input value
|
|
515
|
+
* @returns A reusable `isSnake` function
|
|
516
|
+
*
|
|
517
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
518
|
+
*/
|
|
519
|
+
export declare function createIsSnake<T>(): (input: T) => SnakeCase<T> | null;
|
|
520
|
+
/**
|
|
521
|
+
* Creates a reusable {@link validateSnake} function.
|
|
522
|
+
*
|
|
523
|
+
* @danger You must configure the generic argument `T`
|
|
524
|
+
* @returns Nothing until be configure the generic argument `T`
|
|
525
|
+
* @throws compile error
|
|
526
|
+
*
|
|
527
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
528
|
+
*/
|
|
529
|
+
export declare function createValidateSnake(): never;
|
|
530
|
+
/**
|
|
531
|
+
* Creates a reusable {@link validateSnake} function.
|
|
532
|
+
*
|
|
533
|
+
* @template T Type of the input value
|
|
534
|
+
* @returns A reusable `validateSnake` function
|
|
535
|
+
*
|
|
536
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
537
|
+
*/
|
|
538
|
+
export declare function createValidateSnake<T>(): (input: T) => IValidation<SnakeCase<T>>;
|
package/lib/notations.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createValidateSnake = exports.createIsSnake = exports.createAssertSnake = exports.createSnake = exports.createValidatePascal = exports.createIsPascal = exports.createAssertPascal = exports.createPascal = exports.createValidateCamel = exports.createIsCamel = exports.createAssertCamel = exports.createCamel = exports.validateSnake = exports.isSnake = exports.assertSnake = exports.snake = exports.validatePascal = exports.isPascal = exports.assertPascal = exports.pascal = exports.validateCamel = exports.isCamel = exports.assertCamel = exports.camel = void 0;
|
|
4
|
+
var Namespace_1 = require("./functional/Namespace");
|
|
5
|
+
function camel() {
|
|
6
|
+
return halt("camel");
|
|
7
|
+
}
|
|
8
|
+
exports.camel = camel;
|
|
9
|
+
Object.assign(camel, Namespace_1.Namespace.notations.camel("camel"));
|
|
10
|
+
function assertCamel() {
|
|
11
|
+
return halt("assertCamel");
|
|
12
|
+
}
|
|
13
|
+
exports.assertCamel = assertCamel;
|
|
14
|
+
Object.assign(assertCamel, Namespace_1.Namespace.notations.camel("assertCamel"));
|
|
15
|
+
Object.assign(assertCamel, Namespace_1.Namespace.assert("notations.assertCamel"));
|
|
16
|
+
function isCamel() {
|
|
17
|
+
return halt("isCamel");
|
|
18
|
+
}
|
|
19
|
+
exports.isCamel = isCamel;
|
|
20
|
+
Object.assign(isCamel, Namespace_1.Namespace.notations.camel("isCamel"));
|
|
21
|
+
Object.assign(isCamel, Namespace_1.Namespace.is());
|
|
22
|
+
function validateCamel() {
|
|
23
|
+
return halt("validateCamel");
|
|
24
|
+
}
|
|
25
|
+
exports.validateCamel = validateCamel;
|
|
26
|
+
Object.assign(validateCamel, Namespace_1.Namespace.notations.camel("validateCamel"));
|
|
27
|
+
Object.assign(validateCamel, Namespace_1.Namespace.validate());
|
|
28
|
+
function pascal() {
|
|
29
|
+
return halt("pascal");
|
|
30
|
+
}
|
|
31
|
+
exports.pascal = pascal;
|
|
32
|
+
Object.assign(pascal, Namespace_1.Namespace.notations.pascal("pascal"));
|
|
33
|
+
function assertPascal() {
|
|
34
|
+
return halt("assertPascal");
|
|
35
|
+
}
|
|
36
|
+
exports.assertPascal = assertPascal;
|
|
37
|
+
Object.assign(assertPascal, Namespace_1.Namespace.notations.pascal("assertPascal"));
|
|
38
|
+
Object.assign(assertPascal, Namespace_1.Namespace.assert("notations.assertPascal"));
|
|
39
|
+
function isPascal() {
|
|
40
|
+
return halt("isPascal");
|
|
41
|
+
}
|
|
42
|
+
exports.isPascal = isPascal;
|
|
43
|
+
Object.assign(isPascal, Namespace_1.Namespace.notations.pascal("isPascal"));
|
|
44
|
+
Object.assign(isPascal, Namespace_1.Namespace.is());
|
|
45
|
+
function validatePascal() {
|
|
46
|
+
return halt("validatePascal");
|
|
47
|
+
}
|
|
48
|
+
exports.validatePascal = validatePascal;
|
|
49
|
+
Object.assign(validatePascal, Namespace_1.Namespace.notations.pascal("validatePascal"));
|
|
50
|
+
Object.assign(validatePascal, Namespace_1.Namespace.validate());
|
|
51
|
+
function snake() {
|
|
52
|
+
return halt("snake");
|
|
53
|
+
}
|
|
54
|
+
exports.snake = snake;
|
|
55
|
+
Object.assign(snake, Namespace_1.Namespace.notations.snake("snake"));
|
|
56
|
+
function assertSnake() {
|
|
57
|
+
return halt("assertSnake");
|
|
58
|
+
}
|
|
59
|
+
exports.assertSnake = assertSnake;
|
|
60
|
+
Object.assign(assertSnake, Namespace_1.Namespace.notations.snake("assertSnake"));
|
|
61
|
+
Object.assign(assertSnake, Namespace_1.Namespace.assert("notations.assertSnake"));
|
|
62
|
+
function isSnake() {
|
|
63
|
+
return halt("isSnake");
|
|
64
|
+
}
|
|
65
|
+
exports.isSnake = isSnake;
|
|
66
|
+
Object.assign(isSnake, Namespace_1.Namespace.notations.snake("isSnake"));
|
|
67
|
+
Object.assign(isSnake, Namespace_1.Namespace.is());
|
|
68
|
+
function validateSnake() {
|
|
69
|
+
return halt("validateSnake");
|
|
70
|
+
}
|
|
71
|
+
exports.validateSnake = validateSnake;
|
|
72
|
+
Object.assign(validateSnake, Namespace_1.Namespace.notations.snake("validateSnake"));
|
|
73
|
+
Object.assign(validateSnake, Namespace_1.Namespace.validate());
|
|
74
|
+
function createCamel() {
|
|
75
|
+
halt("createCamel");
|
|
76
|
+
}
|
|
77
|
+
exports.createCamel = createCamel;
|
|
78
|
+
Object.assign(createCamel, Namespace_1.Namespace.notations.camel("createCamel"));
|
|
79
|
+
function createAssertCamel() {
|
|
80
|
+
halt("createAssertCamel");
|
|
81
|
+
}
|
|
82
|
+
exports.createAssertCamel = createAssertCamel;
|
|
83
|
+
Object.assign(createAssertCamel, Namespace_1.Namespace.notations.camel("createAssertCamel"));
|
|
84
|
+
Object.assign(createAssertCamel, Namespace_1.Namespace.assert("notations.createAssertCamel"));
|
|
85
|
+
function createIsCamel() {
|
|
86
|
+
halt("createIsCamel");
|
|
87
|
+
}
|
|
88
|
+
exports.createIsCamel = createIsCamel;
|
|
89
|
+
Object.assign(createIsCamel, Namespace_1.Namespace.notations.camel("createIsCamel"));
|
|
90
|
+
Object.assign(createIsCamel, Namespace_1.Namespace.is());
|
|
91
|
+
function createValidateCamel() {
|
|
92
|
+
halt("createValidateCamel");
|
|
93
|
+
}
|
|
94
|
+
exports.createValidateCamel = createValidateCamel;
|
|
95
|
+
Object.assign(createValidateCamel, Namespace_1.Namespace.notations.camel("createValidateCamel"));
|
|
96
|
+
Object.assign(createValidateCamel, Namespace_1.Namespace.validate());
|
|
97
|
+
function createPascal() {
|
|
98
|
+
halt("createPascal");
|
|
99
|
+
}
|
|
100
|
+
exports.createPascal = createPascal;
|
|
101
|
+
Object.assign(createPascal, Namespace_1.Namespace.notations.pascal("createPascal"));
|
|
102
|
+
function createAssertPascal() {
|
|
103
|
+
halt("createAssertPascal");
|
|
104
|
+
}
|
|
105
|
+
exports.createAssertPascal = createAssertPascal;
|
|
106
|
+
Object.assign(createAssertPascal, Namespace_1.Namespace.notations.pascal("createAssertPascal"));
|
|
107
|
+
Object.assign(createAssertPascal, Namespace_1.Namespace.assert("notations.createAssertPascal"));
|
|
108
|
+
function createIsPascal() {
|
|
109
|
+
halt("createIsPascal");
|
|
110
|
+
}
|
|
111
|
+
exports.createIsPascal = createIsPascal;
|
|
112
|
+
Object.assign(createIsPascal, Namespace_1.Namespace.notations.pascal("createIsPascal"));
|
|
113
|
+
Object.assign(createIsPascal, Namespace_1.Namespace.is());
|
|
114
|
+
function createValidatePascal() {
|
|
115
|
+
halt("createValidatePascal");
|
|
116
|
+
}
|
|
117
|
+
exports.createValidatePascal = createValidatePascal;
|
|
118
|
+
Object.assign(createValidatePascal, Namespace_1.Namespace.notations.pascal("createValidatePascal"));
|
|
119
|
+
Object.assign(createValidatePascal, Namespace_1.Namespace.validate());
|
|
120
|
+
function createSnake() {
|
|
121
|
+
halt("createSnake");
|
|
122
|
+
}
|
|
123
|
+
exports.createSnake = createSnake;
|
|
124
|
+
Object.assign(createSnake, Namespace_1.Namespace.notations.snake("createSnake"));
|
|
125
|
+
function createAssertSnake() {
|
|
126
|
+
halt("createAssertSnake");
|
|
127
|
+
}
|
|
128
|
+
exports.createAssertSnake = createAssertSnake;
|
|
129
|
+
Object.assign(createAssertSnake, Namespace_1.Namespace.notations.snake("createAssertSnake"));
|
|
130
|
+
Object.assign(createAssertSnake, Namespace_1.Namespace.assert("notations.createAssertSnake"));
|
|
131
|
+
function createIsSnake() {
|
|
132
|
+
halt("createIsSnake");
|
|
133
|
+
}
|
|
134
|
+
exports.createIsSnake = createIsSnake;
|
|
135
|
+
Object.assign(createIsSnake, Namespace_1.Namespace.notations.snake("createIsSnake"));
|
|
136
|
+
Object.assign(createIsSnake, Namespace_1.Namespace.is());
|
|
137
|
+
function createValidateSnake() {
|
|
138
|
+
halt("createValidateSnake");
|
|
139
|
+
}
|
|
140
|
+
exports.createValidateSnake = createValidateSnake;
|
|
141
|
+
Object.assign(createValidateSnake, Namespace_1.Namespace.notations.snake("createValidateSnake"));
|
|
142
|
+
Object.assign(createValidateSnake, Namespace_1.Namespace.validate());
|
|
143
|
+
function halt(name) {
|
|
144
|
+
throw new Error("Error on typia.notations.".concat(name, "(): no transform has been configured. Read and follow https://typia.io/docs/setup please."));
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=notations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notations.js","sourceRoot":"","sources":["../src/notations.ts"],"names":[],"mappings":";;;AAAA,oDAAmD;AAwCnD,SAAgB,KAAK;IACjB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAFD,sBAEC;AACD,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,qBAAS,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAiCzD,SAAgB,WAAW;IACvB,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC;AAC/B,CAAC;AAFD,kCAEC;AACD,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,qBAAS,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,qBAAS,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAiCtE,SAAgB,OAAO;IACnB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;AAC3B,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