ddan-js 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/bin/ddan-js.esm.js +1 -1
  2. package/bin/ddan-js.js +1 -1
  3. package/bin/lib/modules/rule/async-validator/index.js +300 -0
  4. package/bin/lib/modules/rule/async-validator/interface.js +2 -0
  5. package/bin/lib/modules/rule/async-validator/messages.js +59 -0
  6. package/bin/lib/modules/rule/async-validator/rule/enum.js +13 -0
  7. package/bin/lib/modules/rule/async-validator/rule/index.js +16 -0
  8. package/bin/lib/modules/rule/async-validator/rule/pattern.js +27 -0
  9. package/bin/lib/modules/rule/async-validator/rule/range.js +54 -0
  10. package/bin/lib/modules/rule/async-validator/rule/required.js +12 -0
  11. package/bin/lib/modules/rule/async-validator/rule/type.js +98 -0
  12. package/bin/lib/modules/rule/async-validator/rule/url.js +55 -0
  13. package/bin/lib/modules/rule/async-validator/rule/whitespace.js +20 -0
  14. package/bin/lib/modules/rule/async-validator/util.js +250 -0
  15. package/bin/lib/modules/rule/async-validator/validator/any.js +16 -0
  16. package/bin/lib/modules/rule/async-validator/validator/array.js +19 -0
  17. package/bin/lib/modules/rule/async-validator/validator/boolean.js +20 -0
  18. package/bin/lib/modules/rule/async-validator/validator/date.js +31 -0
  19. package/bin/lib/modules/rule/async-validator/validator/enum.js +20 -0
  20. package/bin/lib/modules/rule/async-validator/validator/float.js +20 -0
  21. package/bin/lib/modules/rule/async-validator/validator/index.js +36 -0
  22. package/bin/lib/modules/rule/async-validator/validator/integer.js +20 -0
  23. package/bin/lib/modules/rule/async-validator/validator/method.js +19 -0
  24. package/bin/lib/modules/rule/async-validator/validator/number.js +23 -0
  25. package/bin/lib/modules/rule/async-validator/validator/object.js +19 -0
  26. package/bin/lib/modules/rule/async-validator/validator/pattern.js +19 -0
  27. package/bin/lib/modules/rule/async-validator/validator/regexp.js +19 -0
  28. package/bin/lib/modules/rule/async-validator/validator/required.js +10 -0
  29. package/bin/lib/modules/rule/async-validator/validator/string.js +24 -0
  30. package/bin/lib/modules/rule/async-validator/validator/type.js +20 -0
  31. package/bin/lib/modules/rule/index.js +9 -31
  32. package/bin/lib/modules/url/index.js +12 -1
  33. package/bin/lib/util/index.js +30 -1
  34. package/bin/types/index.d.ts +5 -0
  35. package/bin/types/modules/rule/async-validator/index.d.ts +43 -0
  36. package/bin/types/modules/rule/async-validator/interface.d.ts +135 -0
  37. package/bin/types/modules/rule/async-validator/messages.d.ts +3 -0
  38. package/bin/types/modules/rule/async-validator/rule/enum.d.ts +3 -0
  39. package/bin/types/modules/rule/async-validator/rule/index.d.ts +9 -0
  40. package/bin/types/modules/rule/async-validator/rule/pattern.d.ts +3 -0
  41. package/bin/types/modules/rule/async-validator/rule/range.d.ts +3 -0
  42. package/bin/types/modules/rule/async-validator/rule/required.d.ts +3 -0
  43. package/bin/types/modules/rule/async-validator/rule/type.d.ts +3 -0
  44. package/bin/types/modules/rule/async-validator/rule/url.d.ts +2 -0
  45. package/bin/types/modules/rule/async-validator/rule/whitespace.d.ts +14 -0
  46. package/bin/types/modules/rule/async-validator/util.d.ts +16 -0
  47. package/bin/types/modules/rule/async-validator/validator/any.d.ts +3 -0
  48. package/bin/types/modules/rule/async-validator/validator/array.d.ts +3 -0
  49. package/bin/types/modules/rule/async-validator/validator/boolean.d.ts +3 -0
  50. package/bin/types/modules/rule/async-validator/validator/date.d.ts +3 -0
  51. package/bin/types/modules/rule/async-validator/validator/enum.d.ts +3 -0
  52. package/bin/types/modules/rule/async-validator/validator/float.d.ts +3 -0
  53. package/bin/types/modules/rule/async-validator/validator/index.d.ts +20 -0
  54. package/bin/types/modules/rule/async-validator/validator/integer.d.ts +3 -0
  55. package/bin/types/modules/rule/async-validator/validator/method.d.ts +3 -0
  56. package/bin/types/modules/rule/async-validator/validator/number.d.ts +3 -0
  57. package/bin/types/modules/rule/async-validator/validator/object.d.ts +3 -0
  58. package/bin/types/modules/rule/async-validator/validator/pattern.d.ts +3 -0
  59. package/bin/types/modules/rule/async-validator/validator/regexp.d.ts +3 -0
  60. package/bin/types/modules/rule/async-validator/validator/required.d.ts +3 -0
  61. package/bin/types/modules/rule/async-validator/validator/string.d.ts +3 -0
  62. package/bin/types/modules/rule/async-validator/validator/type.d.ts +3 -0
  63. package/bin/types/modules/rule/index.d.ts +5 -0
  64. package/bin/types/modules/url/index.d.ts +2 -0
  65. package/bin/types/util/index.d.ts +4 -0
  66. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import { ExecuteValidator } from '../interface';
2
+ declare const type: ExecuteValidator;
3
+ export default type;
@@ -1,7 +1,12 @@
1
+ import Schema, { Rules, ValidateCallback, ValidateOption, Values } from "./async-validator";
1
2
  declare function validateId(content: any): boolean;
2
3
  declare function validatePhone(content: any): boolean;
4
+ declare function validator(rules: Rules): Schema;
5
+ declare function validate(rules: Rules, source_: Values, o?: ValidateOption | any, oc?: ValidateCallback | any): Promise<Values>;
3
6
  declare const _default: {
4
7
  validateId: typeof validateId;
5
8
  validatePhone: typeof validatePhone;
9
+ validator: typeof validator;
10
+ validate: typeof validate;
6
11
  };
7
12
  export default _default;
@@ -1,3 +1,4 @@
1
+ declare function useHttps(url: string): string;
1
2
  declare const _default: {
2
3
  parse: (qs: any, { sep, eq, max, multiple }?: {
3
4
  sep?: string | undefined;
@@ -23,5 +24,6 @@ declare const _default: {
23
24
  name?: null | undefined;
24
25
  multiple?: boolean | undefined;
25
26
  }) => string;
27
+ useHttps: typeof useHttps;
26
28
  };
27
29
  export default _default;
@@ -1,6 +1,10 @@
1
1
  import includes from "./includes";
2
+ declare function compareArray(arr1: any, arr2: any): boolean;
3
+ declare function merge(target: any, source: any): any;
2
4
  declare const _default: {
3
5
  includes: typeof includes;
6
+ merge: typeof merge;
7
+ compareArray: typeof compareArray;
4
8
  getTag: (value: any) => string;
5
9
  getType: (value: any) => string;
6
10
  toString: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddan-js",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "bin/ddan-js.js",