@idlebox/common 1.3.6 → 1.3.7

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 (80) hide show
  1. package/lib/string/concatType.generated.cjs +1 -1
  2. package/lib/string/concatType.generated.cjs.map +1 -1
  3. package/lib/string/concatType.generated.js +1 -1
  4. package/lib/string/concatType.generated.js.map +1 -1
  5. package/package.json +1 -1
  6. package/.rush/temp/8ffc60c66c29712a4b0392d78f8ceb08fd99cd43.log +0 -10
  7. package/.rush/temp/shrinkwrap-deps.json +0 -671
  8. package/Gulpfile.js +0 -4
  9. package/build-script.json +0 -55
  10. package/common.build.log +0 -42
  11. package/config/rush-project.json +0 -4
  12. package/docs/common.api.json +0 -21006
  13. package/docs/common.api.md +0 -1125
  14. package/docs/tsdoc-metadata.json +0 -11
  15. package/idlebox-common-v1.3.2.tgz +0 -0
  16. package/idlebox-common-v1.3.3.tgz +0 -0
  17. package/src/array/arrayDiff.ts +0 -31
  18. package/src/array/arraySame.ts +0 -15
  19. package/src/array/arrayUnique.ts +0 -50
  20. package/src/array/normalizeArray.ts +0 -13
  21. package/src/array/sortAlpha.ts +0 -15
  22. package/src/date/consts.ts +0 -5
  23. package/src/date/isInvalid.ts +0 -6
  24. package/src/date/sibling.ts +0 -28
  25. package/src/date/timeString.ts +0 -150
  26. package/src/date/unix.ts +0 -13
  27. package/src/debugging/tryInspect.ts +0 -37
  28. package/src/error/convertUnknown.ts +0 -10
  29. package/src/error/getFrame.ts +0 -13
  30. package/src/function/asyncCallbackList.ts +0 -75
  31. package/src/function/callbackList.ts +0 -84
  32. package/src/function/delayCallbackList.ts +0 -45
  33. package/src/function/functionName.ts +0 -39
  34. package/src/lifecycle/dispose/bridges/rxjs.ts +0 -6
  35. package/src/lifecycle/dispose/disposableEvent.ts +0 -117
  36. package/src/lifecycle/dispose/disposedError.ts +0 -16
  37. package/src/lifecycle/dispose/lifecycle.async.ts +0 -61
  38. package/src/lifecycle/dispose/lifecycle.global.ts +0 -61
  39. package/src/lifecycle/dispose/lifecycle.sync.ts +0 -79
  40. package/src/lifecycle/dispose/lifecycle.ts +0 -28
  41. package/src/lifecycle/event/event.ts +0 -63
  42. package/src/lifecycle/promise/cancel.ts +0 -16
  43. package/src/lifecycle/promise/cancellationToken/driver.browser.ts +0 -55
  44. package/src/lifecycle/promise/cancellationToken/driver.common.ts +0 -43
  45. package/src/lifecycle/promise/cancellationToken/source.ts +0 -48
  46. package/src/lifecycle/promise/deferredPromise.ts +0 -102
  47. package/src/lifecycle/timeout/timeout.ts +0 -48
  48. package/src/lifecycle/timeout/timeoutError.ts +0 -16
  49. package/src/log/logger.ts +0 -148
  50. package/src/mapSet/customSet.ts +0 -91
  51. package/src/mapSet/extendMap.ts +0 -40
  52. package/src/misc/assertNotNull.ts +0 -21
  53. package/src/object/definePublicConstant.ts +0 -10
  54. package/src/object/initOnRead.ts +0 -27
  55. package/src/object/objectPath.ts +0 -10
  56. package/src/object/objectSame.ts +0 -52
  57. package/src/path/isAbsolute.ts +0 -11
  58. package/src/path/normalizePath.ts +0 -8
  59. package/src/path/pathArray.ts +0 -42
  60. package/src/platform/globalObject.ts +0 -18
  61. package/src/platform/globalSingleton.ts +0 -82
  62. package/src/platform/globalSymbol.ts +0 -36
  63. package/src/platform/os.ts +0 -45
  64. package/src/promise/awaitIterator.ts +0 -19
  65. package/src/promise/finishAllPromise.ts +0 -50
  66. package/src/promise/promiseBool.ts +0 -10
  67. package/src/promise/promisePool.ts +0 -40
  68. package/src/promise/timeoutPromisePool.ts +0 -22
  69. package/src/reflection/classes/hookClass.ts +0 -47
  70. package/src/reflection/classes/singleton.ts +0 -33
  71. package/src/reflection/methods/bind.ts +0 -30
  72. package/src/reflection/methods/initOnRead.ts +0 -11
  73. package/src/reflection/methods/memorize.ts +0 -33
  74. package/src/string/castCase.ts +0 -44
  75. package/src/string/concatType.generated.ts +0 -255
  76. package/src/string/concatType.generator.ts +0 -31
  77. package/src/string/escapeRegexp.ts +0 -4
  78. package/src/string/pad2.ts +0 -11
  79. package/src/string/sizeString.ts +0 -52
  80. package/src/tsconfig.json +0 -13
@@ -1,52 +0,0 @@
1
- /**
2
- * Convert bytes to largest unit, with SI prefix unit (1000), eg: 211.293GB
3
- * @public
4
- */
5
- export function humanSizeSI(bytes: number, fixed = 2) {
6
- if (bytes < 0) {
7
- return '<0B';
8
- } else if (bytes < 1000) {
9
- return bytes + 'B';
10
- } else if (bytes < 1000000) {
11
- return (bytes / 1000).toFixed(fixed) + 'KiB';
12
- } else if (bytes < 1000000000) {
13
- return (bytes / 1000000).toFixed(fixed) + 'MiB';
14
- } else if (bytes < 1000000000000) {
15
- return (bytes / 1000000000).toFixed(fixed) + 'GiB';
16
- } else if (bytes < 1000000000000000) {
17
- return (bytes / 1000000000000).toFixed(fixed) + 'TiB';
18
- } else {
19
- return (bytes / 1000000000000000).toFixed(fixed) + 'PiB';
20
- }
21
- }
22
-
23
- /**
24
- * Convert bytes to largest unit, with binary prefix unit (1024), eg: 211.293GiB
25
- * @public
26
- */
27
- export function humanSize(bytes: number, fixed = 2) {
28
- if (bytes < 0) {
29
- return '<0B';
30
- } else if (bytes < 1024) {
31
- return bytes + 'B';
32
- } else if (bytes < 1048576) {
33
- // 1024 * 1024
34
- return (bytes / 1024).toFixed(fixed) + 'KiB';
35
- } else if (bytes < 1073741824) {
36
- // 1024 * 1024 * 1024
37
- return (bytes / 1048576).toFixed(fixed) + 'MiB';
38
- } else if (bytes < 1099511627776) {
39
- // 1024 * 1024 * 1024 * 1024
40
- return (bytes / 1073741824).toFixed(fixed) + 'GiB';
41
- } else if (bytes < 1125899906842624) {
42
- // 1024 * 1024 * 1024 * 1024 * 1024
43
- return (bytes / 1099511627776).toFixed(fixed) + 'TiB';
44
- } else {
45
- return (bytes / 1125899906842624).toFixed(fixed) + 'PiB';
46
- }
47
- }
48
-
49
- /** @deprecated */
50
- export function humanSpeed(bps: number) {
51
- return humanSize(bps) + '/s';
52
- }
package/src/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "../node_modules/@build-script/single-dog-asset/package/tsconfig.json",
3
- "compilerOptions": {
4
- "module": "esnext",
5
- "outDir": "../lib",
6
- "rootDir": ".",
7
- "types": ["@idlebox/itypes"],
8
- "declaration": false,
9
- "declarationMap": false
10
- },
11
- "include": ["global.d.ts", "**/*.ts"],
12
- "exclude": ["**/*.generator.ts"]
13
- }