typia 3.5.0-dev.20230212 → 3.5.0-dev.20230214
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/README.md +15 -1
- package/lib/IRandomGenerator.d.ts +15 -0
- package/lib/IRandomGenerator.js +3 -0
- package/lib/IRandomGenerator.js.map +1 -0
- package/lib/factories/ExpressionFactory.d.ts +1 -0
- package/lib/factories/ExpressionFactory.js +4 -0
- package/lib/factories/ExpressionFactory.js.map +1 -1
- package/lib/factories/MetadataFactory.js +15 -5
- package/lib/factories/MetadataFactory.js.map +1 -1
- package/lib/factories/MetadataTagFactory.js +11 -101
- package/lib/factories/MetadataTagFactory.js.map +1 -1
- package/lib/functional/$any.d.ts +1 -0
- package/lib/functional/$any.js +8 -0
- package/lib/functional/$any.js.map +1 -0
- package/lib/{programmers/internal/check_length.d.ts → functional/Namespace.d.ts} +0 -0
- package/lib/functional/Namespace.js +80 -0
- package/lib/functional/Namespace.js.map +1 -0
- package/lib/metadata/IMetadataTag.d.ts +3 -10
- package/lib/module.d.ts +255 -0
- package/lib/module.js +77 -234
- package/lib/module.js.map +1 -1
- package/lib/programmers/AssertCloneProgrammer.d.ts +5 -0
- package/lib/programmers/AssertCloneProgrammer.js +37 -0
- package/lib/programmers/AssertCloneProgrammer.js.map +1 -0
- package/lib/programmers/CloneProgrammer.d.ts +5 -0
- package/lib/programmers/CloneProgrammer.js +285 -0
- package/lib/programmers/CloneProgrammer.js.map +1 -0
- package/lib/programmers/IsCloneProgrammer.d.ts +5 -0
- package/lib/programmers/IsCloneProgrammer.js +37 -0
- package/lib/programmers/IsCloneProgrammer.js.map +1 -0
- package/lib/programmers/IsProgrammer.d.ts +1 -1
- package/lib/programmers/IsProgrammer.js +5 -2
- package/lib/programmers/IsProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.d.ts +5 -0
- package/lib/programmers/RandomProgrammer.js +338 -0
- package/lib/programmers/RandomProgrammer.js.map +1 -0
- package/lib/programmers/StringifyProgrammer.js +1 -1
- package/lib/programmers/StringifyProgrammer.js.map +1 -1
- package/lib/programmers/ValidateCloneProgrammer.d.ts +5 -0
- package/lib/programmers/ValidateCloneProgrammer.js +37 -0
- package/lib/programmers/ValidateCloneProgrammer.js.map +1 -0
- package/lib/programmers/ValidateStringifyProgrammer.js +1 -1
- package/lib/programmers/ValidateStringifyProgrammer.js.map +1 -1
- package/lib/programmers/helpers/CloneJoiner.d.ts +8 -0
- package/lib/programmers/helpers/CloneJoiner.js +80 -0
- package/lib/programmers/helpers/CloneJoiner.js.map +1 -0
- package/lib/programmers/helpers/RandomJoiner.d.ts +10 -0
- package/lib/programmers/helpers/RandomJoiner.js +93 -0
- package/lib/programmers/helpers/RandomJoiner.js.map +1 -0
- package/lib/programmers/helpers/RandomRanger.d.ts +25 -0
- package/lib/programmers/helpers/RandomRanger.js +138 -0
- package/lib/programmers/helpers/RandomRanger.js.map +1 -0
- package/lib/programmers/helpers/StringifyJoinder.js +2 -2
- package/lib/programmers/helpers/StringifyJoinder.js.map +1 -1
- package/lib/programmers/internal/application_array.js +0 -10
- package/lib/programmers/internal/application_array.js.map +1 -1
- package/lib/programmers/internal/application_number.js +4 -12
- package/lib/programmers/internal/application_number.js.map +1 -1
- package/lib/programmers/internal/application_string.js +0 -8
- package/lib/programmers/internal/application_string.js.map +1 -1
- package/lib/programmers/internal/check_array_length.js +3 -4
- package/lib/programmers/internal/check_array_length.js.map +1 -1
- package/lib/programmers/internal/check_bigint.js +0 -12
- package/lib/programmers/internal/check_bigint.js.map +1 -1
- package/lib/programmers/internal/check_number.js +7 -25
- package/lib/programmers/internal/check_number.js.map +1 -1
- package/lib/programmers/internal/check_string_tags.js +2 -3
- package/lib/programmers/internal/check_string_tags.js.map +1 -1
- package/lib/schemas/IJsonSchema.d.ts +36 -2
- package/lib/transformers/CallExpressionTransformer.js +21 -1
- package/lib/transformers/CallExpressionTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/AssertCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/AssertCloneTransformer.js +23 -0
- package/lib/transformers/features/miscellaneous/AssertCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CloneTransformer.js +34 -0
- package/lib/transformers/features/miscellaneous/CloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateAssertCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateAssertCloneTransformer.js +18 -0
- package/lib/transformers/features/miscellaneous/CreateAssertCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateAssertPruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreateAssertPruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/CreateCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateCloneTransformer.js +18 -0
- package/lib/transformers/features/miscellaneous/CreateCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateIsCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateIsCloneTransformer.js +18 -0
- package/lib/transformers/features/miscellaneous/CreateIsCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateIsPruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreateIsPruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/CreatePruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/CreateRandomGenerator.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateRandomGenerator.js +29 -0
- package/lib/transformers/features/miscellaneous/CreateRandomGenerator.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateValidateCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateValidateCloneTransformer.js +18 -0
- package/lib/transformers/features/miscellaneous/CreateValidateCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateValidatePruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreateValidatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/IsCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/IsCloneTransformer.js +23 -0
- package/lib/transformers/features/miscellaneous/IsCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/RandomTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/RandomTransformer.js +35 -0
- package/lib/transformers/features/miscellaneous/RandomTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/ValidateCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/ValidateCloneTransformer.js +23 -0
- package/lib/transformers/features/miscellaneous/ValidateCloneTransformer.js.map +1 -0
- package/lib/transformers/features/parsers/AssertParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/AssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/CreateAssertParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/CreateAssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/CreateIsParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/CreateIsParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/CreateValidateParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/CreateValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/IsParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/IsParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/ValidateParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/ValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateAssertStringifyTransformer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateAssertStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateIsStringifyTransformer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateIsStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateStringifyTransformer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateValidateStringifyProgrammer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateValidateStringifyProgrammer.js.map +1 -1
- package/lib/transformers/features/validators/CreateAssertTransformer.js +2 -1
- package/lib/transformers/features/validators/CreateAssertTransformer.js.map +1 -1
- package/lib/transformers/features/validators/CreateIsTransformer.js +2 -1
- package/lib/transformers/features/validators/CreateIsTransformer.js.map +1 -1
- package/lib/transformers/features/validators/CreateValidateTransformer.js +2 -1
- package/lib/transformers/features/validators/CreateValidateTransformer.js.map +1 -1
- package/lib/utils/RandomGenerator.d.ts +1 -0
- package/lib/utils/RandomGenerator.js +85 -0
- package/lib/utils/RandomGenerator.js.map +1 -0
- package/package.json +8 -3
- package/src/IRandomGenerator.ts +16 -0
- package/src/factories/ExpressionFactory.ts +11 -0
- package/src/factories/MetadataFactory.ts +18 -14
- package/src/factories/MetadataTagFactory.ts +11 -97
- package/src/functional/$any.ts +3 -0
- package/src/functional/Namespace.ts +121 -0
- package/src/metadata/IMetadataTag.ts +2 -11
- package/src/module.ts +390 -350
- package/src/programmers/AssertCloneProgrammer.ts +60 -0
- package/src/programmers/CloneProgrammer.ts +351 -0
- package/src/programmers/IsCloneProgrammer.ts +66 -0
- package/src/programmers/IsProgrammer.ts +8 -5
- package/src/programmers/RandomProgrammer.ts +367 -0
- package/src/programmers/StringifyProgrammer.ts +2 -4
- package/src/programmers/ValidateCloneProgrammer.ts +77 -0
- package/src/programmers/ValidateStringifyProgrammer.ts +1 -4
- package/src/programmers/helpers/CloneJoiner.ts +124 -0
- package/src/programmers/helpers/RandomJoiner.ts +140 -0
- package/src/programmers/helpers/RandomRanger.ts +215 -0
- package/src/programmers/helpers/StringifyJoinder.ts +4 -4
- package/src/programmers/internal/application_array.ts +0 -10
- package/src/programmers/internal/application_number.ts +7 -13
- package/src/programmers/internal/application_string.ts +0 -8
- package/src/programmers/internal/check_array_length.ts +8 -9
- package/src/programmers/internal/check_bigint.ts +0 -21
- package/src/programmers/internal/check_number.ts +0 -30
- package/src/programmers/internal/check_string_tags.ts +7 -7
- package/src/schemas/IJsonSchema.ts +36 -1
- package/src/transformers/CallExpressionTransformer.ts +24 -1
- package/src/transformers/features/miscellaneous/AssertCloneTransformer.ts +38 -0
- package/src/transformers/features/miscellaneous/CloneTransformer.ts +46 -0
- package/src/transformers/features/miscellaneous/CreateAssertCloneTransformer.ts +32 -0
- package/src/transformers/features/miscellaneous/CreateAssertPruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/CreateCloneTransformer.ts +31 -0
- package/src/transformers/features/miscellaneous/CreateIsCloneTransformer.ts +32 -0
- package/src/transformers/features/miscellaneous/CreateIsPruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/CreatePruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/CreateRandomGenerator.ts +39 -0
- package/src/transformers/features/miscellaneous/CreateValidateCloneTransformer.ts +32 -0
- package/src/transformers/features/miscellaneous/CreateValidatePruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/IsCloneTransformer.ts +38 -0
- package/src/transformers/features/miscellaneous/RandomTransformer.ts +45 -0
- package/src/transformers/features/miscellaneous/ValidateCloneTransformer.ts +38 -0
- package/src/transformers/features/parsers/AssertParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/CreateAssertParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/CreateIsParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/CreateValidateParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/IsParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/ValidateParseTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateAssertStringifyTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateIsStringifyTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateStringifyTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateValidateStringifyProgrammer.ts +1 -1
- package/src/transformers/features/validators/CreateAssertTransformer.ts +1 -1
- package/src/transformers/features/validators/CreateIsTransformer.ts +1 -1
- package/src/transformers/features/validators/CreateValidateTransformer.ts +1 -1
- package/src/utils/RandomGenerator.ts +90 -0
- package/lib/programmers/internal/check_length.js +0 -28
- package/lib/programmers/internal/check_length.js.map +0 -1
- package/src/programmers/internal/check_length.ts +0 -46
package/lib/module.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IJsonApplication } from "./schemas/IJsonApplication";
|
|
2
2
|
import { IValidation } from "./IValidation";
|
|
3
|
+
import { Primitive } from "./Primitive";
|
|
3
4
|
export * from "./schemas/IJsonApplication";
|
|
4
5
|
export * from "./schemas/IJsonComponents";
|
|
5
6
|
export * from "./schemas/IJsonSchema";
|
|
@@ -639,6 +640,165 @@ export declare function validateStringify<T>(input: T): IValidation<string>;
|
|
|
639
640
|
* @author Jeongho Nam - https://github.com/samchon
|
|
640
641
|
*/
|
|
641
642
|
export declare function validateStringify<T>(input: unknown): IValidation<string>;
|
|
643
|
+
/**
|
|
644
|
+
* > You must configure the generic argument `T`.
|
|
645
|
+
*
|
|
646
|
+
* Generate random data.
|
|
647
|
+
*
|
|
648
|
+
* Generates a random data following type the `T`.
|
|
649
|
+
*
|
|
650
|
+
* For reference, this `typia.random()` function generates only primitive type.
|
|
651
|
+
* If there're some methods in the type `T` or its nested instances, those would
|
|
652
|
+
* be ignored. Also, when the type `T` has a `toJSON()` method, its return type
|
|
653
|
+
* would be generated instead.
|
|
654
|
+
*
|
|
655
|
+
* @template T Type of data to generate
|
|
656
|
+
* @return Randomly generated data
|
|
657
|
+
*
|
|
658
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
659
|
+
*/
|
|
660
|
+
export declare function random(): never;
|
|
661
|
+
/**
|
|
662
|
+
* Generate random data.
|
|
663
|
+
*
|
|
664
|
+
* Generates a random data following type the `T`.
|
|
665
|
+
*
|
|
666
|
+
* For reference, this `typia.random()` function generates only primitive type.
|
|
667
|
+
* If there're some methods in the type `T` or its nested instances, those would
|
|
668
|
+
* be ignored. Also, when the type `T` has a `toJSON()` method, its return type
|
|
669
|
+
* would be generated instead.
|
|
670
|
+
*
|
|
671
|
+
* @template T Type of data to generate
|
|
672
|
+
* @return Randomly generated data
|
|
673
|
+
*
|
|
674
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
675
|
+
*/
|
|
676
|
+
export declare function random<T>(): Primitive<T>;
|
|
677
|
+
/**
|
|
678
|
+
* Clone a data.
|
|
679
|
+
*
|
|
680
|
+
* Clones an instance following type `T`. If the target *input* value or its member
|
|
681
|
+
* variable contains a class instance that is having a `toJSON()` method, its return
|
|
682
|
+
* value would be cloned.
|
|
683
|
+
*
|
|
684
|
+
* For reference, this `typia.clone()` function does not validate the input value type.
|
|
685
|
+
* It just believes that the input value is following the type `T`. Therefore, if you
|
|
686
|
+
* can't ensure the input value type, it would be better to call {@link assertClone}
|
|
687
|
+
* function instead.
|
|
688
|
+
*
|
|
689
|
+
* @template T Type of the input value
|
|
690
|
+
* @param input A value to be cloned
|
|
691
|
+
* @return Cloned data
|
|
692
|
+
*
|
|
693
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
694
|
+
*/
|
|
695
|
+
export declare function clone<T>(input: T): Primitive<T>;
|
|
696
|
+
/**
|
|
697
|
+
* Clone a data with type assertion.
|
|
698
|
+
*
|
|
699
|
+
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
700
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
701
|
+
* method, its return value would be cloned.
|
|
702
|
+
*
|
|
703
|
+
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
704
|
+
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
|
|
705
|
+
* data would be returned.
|
|
706
|
+
*
|
|
707
|
+
* @template T Type of the input value
|
|
708
|
+
* @param input A value to be cloned
|
|
709
|
+
* @return Cloned data
|
|
710
|
+
*
|
|
711
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
712
|
+
*/
|
|
713
|
+
export declare function assertClone<T>(input: T): Primitive<T>;
|
|
714
|
+
/**
|
|
715
|
+
* Clone a data with type assertion.
|
|
716
|
+
*
|
|
717
|
+
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
718
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
719
|
+
* method, its return value would be cloned.
|
|
720
|
+
*
|
|
721
|
+
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
722
|
+
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
|
|
723
|
+
* data would be returned.
|
|
724
|
+
*
|
|
725
|
+
* @template T Type of the input value
|
|
726
|
+
* @param input A value to be cloned
|
|
727
|
+
* @return Cloned data
|
|
728
|
+
*
|
|
729
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
730
|
+
*/
|
|
731
|
+
export declare function assertClone<T>(input: unknown): Primitive<T>;
|
|
732
|
+
/**
|
|
733
|
+
* Clone a data with type checking.
|
|
734
|
+
*
|
|
735
|
+
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
736
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
737
|
+
* method, its return value would be cloned.
|
|
738
|
+
*
|
|
739
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
740
|
+
* `null` value instead. Otherwise, there's no problem on the `input` value, cloned
|
|
741
|
+
* data would be returned.
|
|
742
|
+
*
|
|
743
|
+
* @template T Type of the input value
|
|
744
|
+
* @param input A value to be cloned
|
|
745
|
+
* @return Cloned data when exact type, otherwise null
|
|
746
|
+
*
|
|
747
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
748
|
+
*/
|
|
749
|
+
export declare function isClone<T>(input: T): Primitive<T> | null;
|
|
750
|
+
/**
|
|
751
|
+
* Clone a data with type checking.
|
|
752
|
+
*
|
|
753
|
+
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
754
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
755
|
+
* method, its return value would be cloned.
|
|
756
|
+
*
|
|
757
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
758
|
+
* `null` value instead. Otherwise, there's no problem on the `input` value, cloned
|
|
759
|
+
* data would be returned.
|
|
760
|
+
*
|
|
761
|
+
* @template T Type of the input value
|
|
762
|
+
* @param input A value to be cloned
|
|
763
|
+
* @return Cloned data when exact type, otherwise null
|
|
764
|
+
*
|
|
765
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
766
|
+
*/
|
|
767
|
+
export declare function isClone<T>(input: unknown): Primitive<T> | null;
|
|
768
|
+
/**
|
|
769
|
+
* Clone a data with detailed type validation.
|
|
770
|
+
*
|
|
771
|
+
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
772
|
+
* `input` value or its member variable contains a class instance that is having a
|
|
773
|
+
* `toJSON()` method, its return value would be cloned.
|
|
774
|
+
*
|
|
775
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
776
|
+
* {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
|
|
777
|
+
* value, cloned data would be stored in `data` property of the output
|
|
778
|
+
* {@link IValidation.Success} instance.
|
|
779
|
+
*
|
|
780
|
+
* @template T Type of the input value
|
|
781
|
+
* @param input A value to be cloned
|
|
782
|
+
* @returns Validation result with cloned value
|
|
783
|
+
*/
|
|
784
|
+
export declare function validateClone<T>(input: T): IValidation<Primitive<T>>;
|
|
785
|
+
/**
|
|
786
|
+
* Clone a data with detailed type validation.
|
|
787
|
+
*
|
|
788
|
+
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
789
|
+
* `input` value or its member variable contains a class instance that is having a
|
|
790
|
+
* `toJSON()` method, its return value would be cloned.
|
|
791
|
+
*
|
|
792
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
793
|
+
* {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
|
|
794
|
+
* value, cloned data would be stored in `data` property of the output
|
|
795
|
+
* {@link IValidation.Success} instance.
|
|
796
|
+
*
|
|
797
|
+
* @template T Type of the input value
|
|
798
|
+
* @param input A value to be cloned
|
|
799
|
+
* @returns Validation result with cloned value
|
|
800
|
+
*/
|
|
801
|
+
export declare function validateClone<T>(input: unknown): IValidation<Primitive<T>>;
|
|
642
802
|
/**
|
|
643
803
|
* Prune, erase superfluous properties.
|
|
644
804
|
*
|
|
@@ -1041,6 +1201,101 @@ export declare function createValidateStringify(): never;
|
|
|
1041
1201
|
* @author Jeongho Nam - https://github.com/samchon
|
|
1042
1202
|
*/
|
|
1043
1203
|
export declare function createValidateStringify<T>(): (input: unknown) => IValidation<string>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Creates a reusable {@link random} function.
|
|
1206
|
+
*
|
|
1207
|
+
* @danger You have to specify the generic argument `T`
|
|
1208
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1209
|
+
* @throws compile error
|
|
1210
|
+
*
|
|
1211
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1212
|
+
*/
|
|
1213
|
+
export declare function createRandom(): never;
|
|
1214
|
+
/**
|
|
1215
|
+
* Creates a resuable {@link random} function.
|
|
1216
|
+
*
|
|
1217
|
+
* @template T Type of the input value
|
|
1218
|
+
* @returns A reusable `random` function
|
|
1219
|
+
*
|
|
1220
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1221
|
+
*/
|
|
1222
|
+
export declare function createRandom<T>(): () => Primitive<T>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Creates a reusable {@link clone} function.
|
|
1225
|
+
*
|
|
1226
|
+
* @danger You have to specify the generic argument `T`
|
|
1227
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1228
|
+
* @throws compile error
|
|
1229
|
+
*
|
|
1230
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1231
|
+
*/
|
|
1232
|
+
export declare function createClone(): never;
|
|
1233
|
+
/**
|
|
1234
|
+
* Creates a resuable {@link clone} function.
|
|
1235
|
+
*
|
|
1236
|
+
* @template T Type of the input value
|
|
1237
|
+
* @returns A reusable `clone` function
|
|
1238
|
+
*
|
|
1239
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1240
|
+
*/
|
|
1241
|
+
export declare function createClone<T>(): (input: T) => Primitive<T>;
|
|
1242
|
+
/**
|
|
1243
|
+
* Creates a reusable {@link assertClone} function.
|
|
1244
|
+
*
|
|
1245
|
+
* @danger You have to specify the generic argument `T`
|
|
1246
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1247
|
+
* @throws compile error
|
|
1248
|
+
*
|
|
1249
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1250
|
+
*/
|
|
1251
|
+
export declare function createAssertClone(): never;
|
|
1252
|
+
/**
|
|
1253
|
+
* Creates a resuable {@link assertClone} function.
|
|
1254
|
+
*
|
|
1255
|
+
* @template T Type of the input value
|
|
1256
|
+
* @returns A reusable `clone` function
|
|
1257
|
+
*
|
|
1258
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1259
|
+
*/
|
|
1260
|
+
export declare function createAssertClone<T>(): (input: unknown) => Primitive<T>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Creates a reusable {@link isClone} function.
|
|
1263
|
+
*
|
|
1264
|
+
* @danger You have to specify the generic argument `T`
|
|
1265
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1266
|
+
* @throws compile error
|
|
1267
|
+
*
|
|
1268
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1269
|
+
*/
|
|
1270
|
+
export declare function createIsClone(): never;
|
|
1271
|
+
/**
|
|
1272
|
+
* Creates a resuable {@link isClone} function.
|
|
1273
|
+
*
|
|
1274
|
+
* @template T Type of the input value
|
|
1275
|
+
* @returns A reusable `clone` function
|
|
1276
|
+
*
|
|
1277
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1278
|
+
*/
|
|
1279
|
+
export declare function createIsClone<T>(): (input: unknown) => Primitive<T> | null;
|
|
1280
|
+
/**
|
|
1281
|
+
* Creates a reusable {@link validateClone} function.
|
|
1282
|
+
*
|
|
1283
|
+
* @danger You have to specify the generic argument `T`
|
|
1284
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1285
|
+
* @throws compile error
|
|
1286
|
+
*
|
|
1287
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1288
|
+
*/
|
|
1289
|
+
export declare function createValidateClone(): never;
|
|
1290
|
+
/**
|
|
1291
|
+
* Creates a resuable {@link validateClone} function.
|
|
1292
|
+
*
|
|
1293
|
+
* @template T Type of the input value
|
|
1294
|
+
* @returns A reusable `clone` function
|
|
1295
|
+
*
|
|
1296
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1297
|
+
*/
|
|
1298
|
+
export declare function createValidateClone<T>(): (input: unknown) => IValidation<Primitive<T>>;
|
|
1044
1299
|
/**
|
|
1045
1300
|
* Creates a reusable {@link prune} function.
|
|
1046
1301
|
*
|
package/lib/module.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -25,22 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
25
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
15
|
};
|
|
27
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.createValidatePrune = exports.createIsPrune = exports.createAssertPrune = exports.createPrune = exports.createValidateStringify = exports.createIsStringify = exports.createAssertStringify = exports.createStringify = exports.createValidateParse = exports.createAssertParse = exports.createIsParse = exports.createValidateEquals = exports.createEquals = exports.createAssertEquals = exports.createValidate = exports.createIs = exports.createAssertType = exports.createAssert = exports.validatePrune = exports.isPrune = exports.assertPrune = exports.prune = exports.metadata = exports.validateStringify = exports.isStringify = exports.assertStringify = exports.stringify = exports.validateParse = exports.isParse = exports.assertParse = exports.application = exports.validateEquals = exports.equals = exports.assertEquals = exports.validate = exports.is = exports.assertType = exports.assert = void 0;
|
|
29
|
-
var
|
|
30
|
-
var _guard_1 = require("./functional/$guard");
|
|
31
|
-
var _is_between_1 = require("./functional/$is_between");
|
|
32
|
-
var _is_email_1 = require("./functional/$is_email");
|
|
33
|
-
var _is_ipv4_1 = require("./functional/$is_ipv4");
|
|
34
|
-
var _is_ipv6_1 = require("./functional/$is_ipv6");
|
|
35
|
-
var _is_url_1 = require("./functional/$is_url");
|
|
36
|
-
var _is_uuid_1 = require("./functional/$is_uuid");
|
|
37
|
-
var _join_1 = require("./functional/$join");
|
|
38
|
-
var _number_1 = require("./functional/$number");
|
|
39
|
-
var _report_1 = require("./functional/$report");
|
|
40
|
-
var _rest_1 = require("./functional/$rest");
|
|
41
|
-
var _string_1 = require("./functional/$string");
|
|
42
|
-
var _tail_1 = require("./functional/$tail");
|
|
43
|
-
var TypeGuardError_1 = require("./TypeGuardError");
|
|
17
|
+
exports.createValidatePrune = exports.createIsPrune = exports.createAssertPrune = exports.createPrune = exports.createValidateClone = exports.createIsClone = exports.createAssertClone = exports.createClone = exports.createRandom = exports.createValidateStringify = exports.createIsStringify = exports.createAssertStringify = exports.createStringify = exports.createValidateParse = exports.createAssertParse = exports.createIsParse = exports.createValidateEquals = exports.createEquals = exports.createAssertEquals = exports.createValidate = exports.createIs = exports.createAssertType = exports.createAssert = exports.validatePrune = exports.isPrune = exports.assertPrune = exports.prune = exports.validateClone = exports.isClone = exports.assertClone = exports.clone = exports.random = exports.metadata = exports.validateStringify = exports.isStringify = exports.assertStringify = exports.stringify = exports.validateParse = exports.isParse = exports.assertParse = exports.application = exports.validateEquals = exports.equals = exports.assertEquals = exports.validate = exports.is = exports.assertType = exports.assert = void 0;
|
|
18
|
+
var Namespace_1 = require("./functional/Namespace");
|
|
44
19
|
__exportStar(require("./schemas/IJsonApplication"), exports);
|
|
45
20
|
__exportStar(require("./schemas/IJsonComponents"), exports);
|
|
46
21
|
__exportStar(require("./schemas/IJsonSchema"), exports);
|
|
@@ -51,142 +26,37 @@ function assert() {
|
|
|
51
26
|
halt("assert");
|
|
52
27
|
}
|
|
53
28
|
exports.assert = assert;
|
|
54
|
-
(
|
|
55
|
-
assert.is_uuid = _is_uuid_1.$is_uuid;
|
|
56
|
-
assert.is_email = _is_email_1.$is_email;
|
|
57
|
-
assert.is_url = _is_url_1.$is_url;
|
|
58
|
-
assert.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
59
|
-
assert.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
60
|
-
assert.is_between = _is_between_1.$is_between;
|
|
61
|
-
assert.join = _join_1.$join;
|
|
62
|
-
assert.every = _every_1.$every;
|
|
63
|
-
assert.guard = (0, _guard_1.$guard)("typia.assert");
|
|
64
|
-
})(assert = exports.assert || (exports.assert = {}));
|
|
29
|
+
Object.assign(assert, Namespace_1.Namespace.assert("assert"));
|
|
65
30
|
function assertType() {
|
|
66
31
|
halt("assertType");
|
|
67
32
|
}
|
|
68
33
|
exports.assertType = assertType;
|
|
69
|
-
(
|
|
70
|
-
function predicate(matched, exceptionable, closure) {
|
|
71
|
-
if (matched === false && exceptionable === true)
|
|
72
|
-
throw new TypeGuardError_1.TypeGuardError(__assign({ method: "typia.assertType" }, closure()));
|
|
73
|
-
return matched;
|
|
74
|
-
}
|
|
75
|
-
assertType.predicate = predicate;
|
|
76
|
-
})(assertType = exports.assertType || (exports.assertType = {}));
|
|
77
|
-
Object.assign(assertType, assert);
|
|
34
|
+
Object.assign(assertType, Namespace_1.Namespace.assert("assertType"));
|
|
78
35
|
function is() {
|
|
79
36
|
halt("is");
|
|
80
37
|
}
|
|
81
38
|
exports.is = is;
|
|
82
|
-
(
|
|
83
|
-
is.is_uuid = _is_uuid_1.$is_uuid;
|
|
84
|
-
is.is_email = _is_email_1.$is_email;
|
|
85
|
-
is.is_url = _is_url_1.$is_url;
|
|
86
|
-
is.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
87
|
-
is.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
88
|
-
is.is_between = _is_between_1.$is_between;
|
|
89
|
-
})(is = exports.is || (exports.is = {}));
|
|
39
|
+
Object.assign(is, Namespace_1.Namespace.assert("is"));
|
|
90
40
|
function validate() {
|
|
91
41
|
halt("validate");
|
|
92
42
|
}
|
|
93
43
|
exports.validate = validate;
|
|
94
|
-
(
|
|
95
|
-
validate.is_uuid = _is_uuid_1.$is_uuid;
|
|
96
|
-
validate.is_email = _is_email_1.$is_email;
|
|
97
|
-
validate.is_url = _is_url_1.$is_url;
|
|
98
|
-
validate.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
99
|
-
validate.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
100
|
-
validate.is_between = _is_between_1.$is_between;
|
|
101
|
-
validate.join = _join_1.$join;
|
|
102
|
-
validate.report = _report_1.$report;
|
|
103
|
-
validate.predicate = function (res) {
|
|
104
|
-
return function (matched, exceptionable, closure) {
|
|
105
|
-
if (matched === false && exceptionable === true)
|
|
106
|
-
(function () {
|
|
107
|
-
res.success && (res.success = false);
|
|
108
|
-
var errorList = res.errors;
|
|
109
|
-
var error = closure();
|
|
110
|
-
if (errorList.length) {
|
|
111
|
-
var last = errorList[errorList.length - 1].path;
|
|
112
|
-
if (last.length >= error.path.length &&
|
|
113
|
-
last.substring(0, error.path.length) === error.path)
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
errorList.push(error);
|
|
117
|
-
return;
|
|
118
|
-
})();
|
|
119
|
-
return matched;
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
})(validate = exports.validate || (exports.validate = {}));
|
|
44
|
+
Object.assign(validate, Namespace_1.Namespace.validate());
|
|
123
45
|
function assertEquals() {
|
|
124
46
|
halt("assertEquals");
|
|
125
47
|
}
|
|
126
48
|
exports.assertEquals = assertEquals;
|
|
127
|
-
(
|
|
128
|
-
assertEquals.is_uuid = _is_uuid_1.$is_uuid;
|
|
129
|
-
assertEquals.is_email = _is_email_1.$is_email;
|
|
130
|
-
assertEquals.is_url = _is_url_1.$is_url;
|
|
131
|
-
assertEquals.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
132
|
-
assertEquals.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
133
|
-
assertEquals.is_between = _is_between_1.$is_between;
|
|
134
|
-
assertEquals.join = _join_1.$join;
|
|
135
|
-
assertEquals.every = _every_1.$every;
|
|
136
|
-
assertEquals.guard = (0, _guard_1.$guard)("typia.assertEquals");
|
|
137
|
-
function predicate(matched, exceptionable, closure) {
|
|
138
|
-
if (matched === false && exceptionable === true)
|
|
139
|
-
throw new TypeGuardError_1.TypeGuardError(__assign({ method: "typia.assertEquals" }, closure()));
|
|
140
|
-
return matched;
|
|
141
|
-
}
|
|
142
|
-
assertEquals.predicate = predicate;
|
|
143
|
-
})(assertEquals = exports.assertEquals || (exports.assertEquals = {}));
|
|
49
|
+
Object.assign(assertEquals, Namespace_1.Namespace.assert("assertEquals"));
|
|
144
50
|
function equals() {
|
|
145
51
|
halt("equals");
|
|
146
52
|
}
|
|
147
53
|
exports.equals = equals;
|
|
148
|
-
(
|
|
149
|
-
equals.is_uuid = _is_uuid_1.$is_uuid;
|
|
150
|
-
equals.is_email = _is_email_1.$is_email;
|
|
151
|
-
equals.is_url = _is_url_1.$is_url;
|
|
152
|
-
equals.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
153
|
-
equals.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
154
|
-
equals.is_between = _is_between_1.$is_between;
|
|
155
|
-
equals.join = _join_1.$join;
|
|
156
|
-
})(equals = exports.equals || (exports.equals = {}));
|
|
54
|
+
Object.assign(equals, Namespace_1.Namespace.is());
|
|
157
55
|
function validateEquals() {
|
|
158
56
|
halt("validateEquals");
|
|
159
57
|
}
|
|
160
58
|
exports.validateEquals = validateEquals;
|
|
161
|
-
(
|
|
162
|
-
validateEquals.is_uuid = _is_uuid_1.$is_uuid;
|
|
163
|
-
validateEquals.is_email = _is_email_1.$is_email;
|
|
164
|
-
validateEquals.is_url = _is_url_1.$is_url;
|
|
165
|
-
validateEquals.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
166
|
-
validateEquals.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
167
|
-
validateEquals.is_between = _is_between_1.$is_between;
|
|
168
|
-
validateEquals.join = _join_1.$join;
|
|
169
|
-
validateEquals.report = validate.report;
|
|
170
|
-
validateEquals.predicate = function (res) {
|
|
171
|
-
return function (matched, exceptionable, closure) {
|
|
172
|
-
if (matched === false && exceptionable === true)
|
|
173
|
-
(function () {
|
|
174
|
-
res.success && (res.success = false);
|
|
175
|
-
var errorList = res.errors;
|
|
176
|
-
var error = closure();
|
|
177
|
-
if (errorList.length) {
|
|
178
|
-
var last = errorList[errorList.length - 1].path;
|
|
179
|
-
if (last.length >= error.path.length &&
|
|
180
|
-
last.substring(0, error.path.length) === error.path)
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
errorList.push(error);
|
|
184
|
-
return;
|
|
185
|
-
})();
|
|
186
|
-
return matched;
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
})(validateEquals = exports.validateEquals || (exports.validateEquals = {}));
|
|
59
|
+
Object.assign(validateEquals, Namespace_1.Namespace.validate());
|
|
190
60
|
function application() {
|
|
191
61
|
halt("application");
|
|
192
62
|
}
|
|
@@ -195,17 +65,7 @@ function assertParse() {
|
|
|
195
65
|
halt("assertParse");
|
|
196
66
|
}
|
|
197
67
|
exports.assertParse = assertParse;
|
|
198
|
-
(
|
|
199
|
-
assertParse.is_uuid = _is_uuid_1.$is_uuid;
|
|
200
|
-
assertParse.is_email = _is_email_1.$is_email;
|
|
201
|
-
assertParse.is_url = _is_url_1.$is_url;
|
|
202
|
-
assertParse.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
203
|
-
assertParse.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
204
|
-
assertParse.is_between = _is_between_1.$is_between;
|
|
205
|
-
assertParse.join = _join_1.$join;
|
|
206
|
-
assertParse.every = _every_1.$every;
|
|
207
|
-
assertParse.guard = (0, _guard_1.$guard)("typia.assertParse");
|
|
208
|
-
})(assertParse = exports.assertParse || (exports.assertParse = {}));
|
|
68
|
+
Object.assign(assertParse, Namespace_1.Namespace.assert("assertParse"));
|
|
209
69
|
function isParse() {
|
|
210
70
|
halt("isParse");
|
|
211
71
|
}
|
|
@@ -220,122 +80,80 @@ function stringify() {
|
|
|
220
80
|
halt("stringify");
|
|
221
81
|
}
|
|
222
82
|
exports.stringify = stringify;
|
|
223
|
-
(
|
|
224
|
-
stringify.number = _number_1.$number;
|
|
225
|
-
stringify.string = _string_1.$string;
|
|
226
|
-
stringify.tail = _tail_1.$tail;
|
|
227
|
-
stringify.rest = _rest_1.$rest;
|
|
228
|
-
function throws(props) {
|
|
229
|
-
throw new TypeGuardError_1.TypeGuardError(__assign(__assign({}, props), { method: "typia.stringify" }));
|
|
230
|
-
}
|
|
231
|
-
stringify.throws = throws;
|
|
232
|
-
})(stringify = exports.stringify || (exports.stringify = {}));
|
|
83
|
+
Object.assign(stringify, Namespace_1.Namespace.stringify("stringify"));
|
|
233
84
|
function assertStringify() {
|
|
234
85
|
halt("assertStringify");
|
|
235
86
|
}
|
|
236
87
|
exports.assertStringify = assertStringify;
|
|
237
|
-
(
|
|
238
|
-
|
|
239
|
-
assertStringify.is_email = _is_email_1.$is_email;
|
|
240
|
-
assertStringify.is_url = _is_url_1.$is_url;
|
|
241
|
-
assertStringify.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
242
|
-
assertStringify.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
243
|
-
assertStringify.is_between = _is_between_1.$is_between;
|
|
244
|
-
assertStringify.number = _number_1.$number;
|
|
245
|
-
assertStringify.string = _string_1.$string;
|
|
246
|
-
assertStringify.tail = _tail_1.$tail;
|
|
247
|
-
assertStringify.rest = _rest_1.$rest;
|
|
248
|
-
assertStringify.join = _join_1.$join;
|
|
249
|
-
assertStringify.guard = (0, _guard_1.$guard)("typia.assertStringify");
|
|
250
|
-
assertStringify.every = _every_1.$every;
|
|
251
|
-
assertStringify.throws = function () { };
|
|
252
|
-
function predicate(matched, exceptionable, closure) {
|
|
253
|
-
if (matched === false && exceptionable === true)
|
|
254
|
-
throw new TypeGuardError_1.TypeGuardError(__assign({ method: "typia.assertStringify" }, closure()));
|
|
255
|
-
return matched;
|
|
256
|
-
}
|
|
257
|
-
assertStringify.predicate = predicate;
|
|
258
|
-
})(assertStringify = exports.assertStringify || (exports.assertStringify = {}));
|
|
88
|
+
Object.assign(assertStringify, Namespace_1.Namespace.assert("assertStringify"));
|
|
89
|
+
Object.assign(assertStringify, Namespace_1.Namespace.stringify("assertStringify"));
|
|
259
90
|
function isStringify() {
|
|
260
91
|
halt("isStringify");
|
|
261
92
|
}
|
|
262
93
|
exports.isStringify = isStringify;
|
|
263
|
-
(
|
|
264
|
-
|
|
265
|
-
isStringify.is_email = _is_email_1.$is_email;
|
|
266
|
-
isStringify.is_url = _is_url_1.$is_url;
|
|
267
|
-
isStringify.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
268
|
-
isStringify.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
269
|
-
isStringify.is_between = _is_between_1.$is_between;
|
|
270
|
-
isStringify.number = _number_1.$number;
|
|
271
|
-
isStringify.string = _string_1.$string;
|
|
272
|
-
isStringify.tail = _tail_1.$tail;
|
|
273
|
-
isStringify.rest = _rest_1.$rest;
|
|
274
|
-
isStringify.throws = function () { };
|
|
275
|
-
})(isStringify = exports.isStringify || (exports.isStringify = {}));
|
|
94
|
+
Object.assign(isStringify, Namespace_1.Namespace.is());
|
|
95
|
+
Object.assign(isStringify, Namespace_1.Namespace.stringify("isStringify"));
|
|
276
96
|
function validateStringify() {
|
|
277
97
|
halt("validateStringify");
|
|
278
98
|
}
|
|
279
99
|
exports.validateStringify = validateStringify;
|
|
280
|
-
Object.assign(validateStringify, validate);
|
|
281
|
-
Object.assign(validateStringify, stringify);
|
|
100
|
+
Object.assign(validateStringify, Namespace_1.Namespace.validate());
|
|
101
|
+
Object.assign(validateStringify, Namespace_1.Namespace.stringify("validateStringify"));
|
|
282
102
|
function metadata() {
|
|
283
103
|
halt("metadata");
|
|
284
104
|
}
|
|
285
105
|
exports.metadata = metadata;
|
|
106
|
+
function random() {
|
|
107
|
+
halt("random");
|
|
108
|
+
}
|
|
109
|
+
exports.random = random;
|
|
110
|
+
Object.assign(random, Namespace_1.Namespace.random());
|
|
111
|
+
function clone() {
|
|
112
|
+
halt("clone");
|
|
113
|
+
}
|
|
114
|
+
exports.clone = clone;
|
|
115
|
+
Object.assign(clone, Namespace_1.Namespace.clone("clone"));
|
|
116
|
+
function assertClone() {
|
|
117
|
+
halt("assertClone");
|
|
118
|
+
}
|
|
119
|
+
exports.assertClone = assertClone;
|
|
120
|
+
Object.assign(assertClone, Namespace_1.Namespace.assert("assertClone"));
|
|
121
|
+
Object.assign(assertClone, Namespace_1.Namespace.clone("assertClone"));
|
|
122
|
+
function isClone() {
|
|
123
|
+
halt("isClone");
|
|
124
|
+
}
|
|
125
|
+
exports.isClone = isClone;
|
|
126
|
+
Object.assign(isClone, Namespace_1.Namespace.is());
|
|
127
|
+
Object.assign(isClone, Namespace_1.Namespace.clone("isClone"));
|
|
128
|
+
function validateClone() {
|
|
129
|
+
halt("validateClone");
|
|
130
|
+
}
|
|
131
|
+
exports.validateClone = validateClone;
|
|
132
|
+
Object.assign(validateClone, Namespace_1.Namespace.validate());
|
|
133
|
+
Object.assign(validateClone, Namespace_1.Namespace.clone("validateClone"));
|
|
286
134
|
function prune() {
|
|
287
135
|
halt("prune");
|
|
288
136
|
}
|
|
289
137
|
exports.prune = prune;
|
|
290
|
-
(
|
|
291
|
-
prune.is_uuid = _is_uuid_1.$is_uuid;
|
|
292
|
-
prune.is_email = _is_email_1.$is_email;
|
|
293
|
-
prune.is_url = _is_url_1.$is_url;
|
|
294
|
-
prune.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
295
|
-
prune.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
296
|
-
prune.is_between = _is_between_1.$is_between;
|
|
297
|
-
function throws(props) {
|
|
298
|
-
throw new TypeGuardError_1.TypeGuardError(__assign(__assign({}, props), { method: "typia.prune" }));
|
|
299
|
-
}
|
|
300
|
-
prune.throws = throws;
|
|
301
|
-
})(prune = exports.prune || (exports.prune = {}));
|
|
138
|
+
Object.assign(prune, Namespace_1.Namespace.prune("prune"));
|
|
302
139
|
function assertPrune() {
|
|
303
140
|
halt("assertPrune");
|
|
304
141
|
}
|
|
305
142
|
exports.assertPrune = assertPrune;
|
|
306
|
-
(
|
|
307
|
-
|
|
308
|
-
assertPrune.is_email = _is_email_1.$is_email;
|
|
309
|
-
assertPrune.is_url = _is_url_1.$is_url;
|
|
310
|
-
assertPrune.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
311
|
-
assertPrune.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
312
|
-
assertPrune.is_between = _is_between_1.$is_between;
|
|
313
|
-
assertPrune.join = _join_1.$join;
|
|
314
|
-
assertPrune.every = _every_1.$every;
|
|
315
|
-
assertPrune.guard = (0, _guard_1.$guard)("typia.assertPrune");
|
|
316
|
-
})(assertPrune = exports.assertPrune || (exports.assertPrune = {}));
|
|
143
|
+
Object.assign(assertPrune, Namespace_1.Namespace.assert("assertPrune"));
|
|
144
|
+
Object.assign(assertPrune, Namespace_1.Namespace.prune("assertPrune"));
|
|
317
145
|
function isPrune() {
|
|
318
146
|
halt("isPrune");
|
|
319
147
|
}
|
|
320
148
|
exports.isPrune = isPrune;
|
|
321
|
-
(
|
|
322
|
-
|
|
323
|
-
isPrune.is_email = _is_email_1.$is_email;
|
|
324
|
-
isPrune.is_url = _is_url_1.$is_url;
|
|
325
|
-
isPrune.is_ipv4 = _is_ipv4_1.$is_ipv4;
|
|
326
|
-
isPrune.is_ipv6 = _is_ipv6_1.$is_ipv6;
|
|
327
|
-
isPrune.is_between = _is_between_1.$is_between;
|
|
328
|
-
function throws(props) {
|
|
329
|
-
throw new TypeGuardError_1.TypeGuardError(__assign(__assign({}, props), { method: "typia.prune" }));
|
|
330
|
-
}
|
|
331
|
-
isPrune.throws = throws;
|
|
332
|
-
})(isPrune = exports.isPrune || (exports.isPrune = {}));
|
|
149
|
+
Object.assign(isPrune, Namespace_1.Namespace.is());
|
|
150
|
+
Object.assign(isPrune, Namespace_1.Namespace.prune("isPrune"));
|
|
333
151
|
function validatePrune() {
|
|
334
152
|
halt("validatePrune");
|
|
335
153
|
}
|
|
336
154
|
exports.validatePrune = validatePrune;
|
|
337
|
-
Object.assign(validatePrune, prune);
|
|
338
|
-
Object.assign(validatePrune, validate);
|
|
155
|
+
Object.assign(validatePrune, Namespace_1.Namespace.prune("validatePrune"));
|
|
156
|
+
Object.assign(validatePrune, Namespace_1.Namespace.validate());
|
|
339
157
|
function createAssert() {
|
|
340
158
|
halt("createAssert");
|
|
341
159
|
}
|
|
@@ -406,6 +224,31 @@ function createValidateStringify() {
|
|
|
406
224
|
}
|
|
407
225
|
exports.createValidateStringify = createValidateStringify;
|
|
408
226
|
Object.assign(createValidateStringify, validateStringify);
|
|
227
|
+
function createRandom() {
|
|
228
|
+
halt("createRandom");
|
|
229
|
+
}
|
|
230
|
+
exports.createRandom = createRandom;
|
|
231
|
+
Object.assign(createRandom, random);
|
|
232
|
+
function createClone() {
|
|
233
|
+
halt("createClone");
|
|
234
|
+
}
|
|
235
|
+
exports.createClone = createClone;
|
|
236
|
+
Object.assign(createClone, clone);
|
|
237
|
+
function createAssertClone() {
|
|
238
|
+
halt("createAssertClone");
|
|
239
|
+
}
|
|
240
|
+
exports.createAssertClone = createAssertClone;
|
|
241
|
+
Object.assign(createAssertClone, assertClone);
|
|
242
|
+
function createIsClone() {
|
|
243
|
+
halt("createIsClone");
|
|
244
|
+
}
|
|
245
|
+
exports.createIsClone = createIsClone;
|
|
246
|
+
Object.assign(createIsClone, isClone);
|
|
247
|
+
function createValidateClone() {
|
|
248
|
+
halt("createValidateClone");
|
|
249
|
+
}
|
|
250
|
+
exports.createValidateClone = createValidateClone;
|
|
251
|
+
Object.assign(createValidateClone, validateClone);
|
|
409
252
|
function createPrune() {
|
|
410
253
|
halt("createPrune");
|
|
411
254
|
}
|