prototype-helper 0.3.12 → 0.3.13

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 (55) hide show
  1. package/.vscode/settings.json +6 -6
  2. package/LICENSE +21 -21
  3. package/README.md +198 -198
  4. package/dist/extension/array.d.ts +1 -1
  5. package/dist/extension/array.js +103 -103
  6. package/dist/extension/index.d.ts +4 -4
  7. package/dist/extension/index.js +6 -6
  8. package/dist/extension/number.d.ts +1 -1
  9. package/dist/extension/number.js +71 -71
  10. package/dist/extension/number.test.d.ts +3 -3
  11. package/dist/extension/number.test.js +21 -21
  12. package/dist/extension/object.d.ts +1 -1
  13. package/dist/extension/object.js +12 -12
  14. package/dist/extension/string.d.ts +1 -22
  15. package/dist/extension/string.js +55 -50
  16. package/dist/extension/string.js.map +1 -1
  17. package/dist/extension/string.test.d.ts +2 -2
  18. package/dist/extension/string.test.js +17 -17
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.js +5 -5
  21. package/dist/interface/array.d.ts +19 -19
  22. package/dist/interface/array.js +1 -1
  23. package/dist/interface/index.d.ts +3 -3
  24. package/dist/interface/index.js +5 -5
  25. package/dist/interface/number.d.ts +23 -23
  26. package/dist/interface/number.js +1 -1
  27. package/dist/interface/object.js +5 -5
  28. package/dist/interface/string.d.ts +24 -0
  29. package/dist/interface/string.js +2 -0
  30. package/dist/interface/string.js.map +1 -0
  31. package/dist/override/console.d.ts +17 -17
  32. package/dist/override/console.js +70 -70
  33. package/dist/override/console.js.map +1 -1
  34. package/dist/override/index.d.ts +3 -3
  35. package/dist/override/index.js +5 -5
  36. package/dist/override/linq.d.ts +1 -1
  37. package/dist/override/linq.js +2 -2
  38. package/dist/override/math.d.ts +10 -10
  39. package/dist/override/math.js +23 -38
  40. package/dist/override/math.js.map +1 -1
  41. package/dist/test.d.ts +1 -1
  42. package/dist/test.js +115 -115
  43. package/dist/utils/deepCopy.d.ts +2 -0
  44. package/dist/utils/deepCopy.js +14 -0
  45. package/dist/utils/deepCopy.js.map +1 -0
  46. package/dist/utils/math.d.ts +1 -0
  47. package/dist/utils/math.js +21 -0
  48. package/dist/utils/math.js.map +1 -0
  49. package/dist/utils/valid.d.ts +1 -0
  50. package/dist/utils/valid.js +14 -0
  51. package/dist/utils/valid.js.map +1 -0
  52. package/package.json +1 -1
  53. package/tsconfig.json +48 -32
  54. package/types.d.ts +27 -0
  55. package/pnpm-lock.yaml +0 -4329
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prototype-helper",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/tsconfig.json CHANGED
@@ -1,32 +1,48 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "outDir": "./dist",
5
- "target": "ES2016",
6
- "module": "commonjs",
7
- "moduleResolution": "Node",
8
- "sourceMap": true,
9
- "lib": ["es2016"],
10
- "paths": {
11
- "@/*": ["/src/*"],
12
- "~/*": ["/src/*"]
13
- },
14
- "noImplicitAny": false,
15
- "esModuleInterop": true,
16
- "experimentalDecorators": true,
17
- "emitDecoratorMetadata": true,
18
- "strict": true,
19
- "allowSyntheticDefaultImports": true,
20
- "resolveJsonModule": true,
21
- "declaration": true
22
- },
23
- "include": ["./src/**/*.ts"],
24
- "exclude": ["node_modules", "**/*.spec.ts"],
25
- "typeRoots": ["./node_modules/@types"],
26
- "types": ["@types/node"],
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/k22pr/ts-proto"
30
- },
31
- "license": "MIT"
32
- }
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "outDir": "./dist",
5
+ "target": "ES2016",
6
+ "module": "commonjs",
7
+ "moduleResolution": "Node",
8
+ "sourceMap": true,
9
+ "lib": [
10
+ "es2016"
11
+ ],
12
+ "paths": {
13
+ "@/*": [
14
+ "/src/*"
15
+ ],
16
+ "~/*": [
17
+ "/src/*"
18
+ ]
19
+ },
20
+ "noImplicitAny": false,
21
+ "esModuleInterop": true,
22
+ "experimentalDecorators": true,
23
+ "emitDecoratorMetadata": true,
24
+ "strict": true,
25
+ "allowSyntheticDefaultImports": true,
26
+ "resolveJsonModule": true,
27
+ "declaration": true
28
+ },
29
+ "include": [
30
+ "./src/**/*.ts"
31
+ ],
32
+ "exclude": [
33
+ "node_modules",
34
+ "**/*.spec.ts"
35
+ ],
36
+ "typeRoots": [
37
+ "./node_modules/@types"
38
+ ],
39
+ "types": [
40
+ "@types/node",
41
+ "./types.d.ts"
42
+ ],
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/k22pr/ts-proto"
46
+ },
47
+ "license": "MIT"
48
+ }
package/types.d.ts ADDED
@@ -0,0 +1,27 @@
1
+
2
+ interface StringConstructor {
3
+ fixPoint(s: string, length: number): string;
4
+ fixNumber(length: number): string;
5
+ leadingChars(chars: string | number, length: number): string;
6
+ toComma(): string;
7
+ toNumber(): number;
8
+ addSymbol(space?: string): string;
9
+ fromJSON<T>(): T;
10
+ issetWord(word: string): boolean;
11
+ getChar(index: number): string;
12
+ isNumber(num: any): boolean;
13
+
14
+ }
15
+
16
+ interface String {
17
+ fixPoint(length: number): string;
18
+ fixNumber(length: number): string;
19
+ leadingChars(chars: string | number, length: number): string;
20
+ toComma(): string;
21
+ toNumber(): number;
22
+ addSymbol(space?: string): string;
23
+ fromJson<T>(): T;
24
+ issetWord(word: string): boolean;
25
+ getChar(index: number): string;
26
+ isNumber(num: any): boolean;
27
+ }