@jscrpt/common 1.2.0 → 2.0.0-beta.20211108120022

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 (238) hide show
  1. package/changelog.md +24 -0
  2. package/dist/es2015/decorators/bindThis.decorator.js +24 -24
  3. package/dist/es2015/decorators/bindThis.decorator.js.map +1 -0
  4. package/dist/es2015/decorators/callOnce.decorator.js +29 -28
  5. package/dist/es2015/decorators/callOnce.decorator.js.map +1 -0
  6. package/dist/es2015/decorators/debounceCall.decorator.js +25 -26
  7. package/dist/es2015/decorators/debounceCall.decorator.js.map +1 -0
  8. package/dist/es2015/decorators/index.js +4 -4
  9. package/dist/es2015/decorators/index.js.map +1 -0
  10. package/dist/es2015/encoder/encoder.js +220 -231
  11. package/dist/es2015/encoder/encoder.js.map +1 -0
  12. package/dist/es2015/enums/index.js +2 -2
  13. package/dist/es2015/enums/index.js.map +1 -0
  14. package/dist/es2015/enums/orderByDirection.js +15 -15
  15. package/dist/es2015/enums/orderByDirection.js.map +1 -0
  16. package/dist/es2015/index.js +10 -24
  17. package/dist/es2015/index.js.map +1 -0
  18. package/dist/es2015/indexNode.js +2 -2
  19. package/dist/es2015/indexNode.js.map +1 -0
  20. package/dist/es2015/initJsDevMode.js +8 -0
  21. package/dist/es2015/initJsDevMode.js.map +1 -0
  22. package/dist/es2015/jsDevMode.js +8 -8
  23. package/dist/es2015/jsDevMode.js.map +1 -0
  24. package/dist/es2015/normalizer/charMaps.js +20 -27
  25. package/dist/es2015/normalizer/charMaps.js.map +1 -0
  26. package/dist/es2015/normalizer/index.js +3 -3
  27. package/dist/es2015/normalizer/index.js.map +1 -0
  28. package/dist/es2015/normalizer/normalizer.js +14 -14
  29. package/dist/es2015/normalizer/normalizer.js.map +1 -0
  30. package/dist/es2015/paginator/paginator.js +230 -224
  31. package/dist/es2015/paginator/paginator.js.map +1 -0
  32. package/dist/es2015/types/dictionaries.js +2 -1
  33. package/dist/es2015/types/dictionaries.js.map +1 -0
  34. package/dist/es2015/types/enums.js +2 -0
  35. package/dist/es2015/types/enums.js.map +1 -0
  36. package/dist/es2015/types/functions.js +2 -0
  37. package/dist/es2015/types/functions.js.map +1 -0
  38. package/dist/es2015/types/index.js +5 -3
  39. package/dist/es2015/types/index.js.map +1 -0
  40. package/dist/es2015/types/valueNamePair.js +2 -1
  41. package/dist/es2015/types/valueNamePair.js.map +1 -0
  42. package/dist/es2015/utils/common.js +209 -215
  43. package/dist/es2015/utils/common.js.map +1 -0
  44. package/dist/es2015/utils/index.js +4 -4
  45. package/dist/es2015/utils/index.js.map +1 -0
  46. package/dist/es2015/utils/lang.js +79 -79
  47. package/dist/es2015/utils/lang.js.map +1 -0
  48. package/dist/es2015/utils/nameof.js +6 -6
  49. package/dist/es2015/utils/nameof.js.map +1 -0
  50. package/dist/es2020/decorators/bindThis.decorator.js +23 -0
  51. package/dist/es2020/decorators/bindThis.decorator.js.map +1 -0
  52. package/dist/es2020/decorators/callOnce.decorator.js +28 -0
  53. package/dist/es2020/decorators/callOnce.decorator.js.map +1 -0
  54. package/dist/es2020/decorators/debounceCall.decorator.js +24 -0
  55. package/dist/es2020/decorators/debounceCall.decorator.js.map +1 -0
  56. package/dist/es2020/decorators/index.js +4 -0
  57. package/dist/es2020/decorators/index.js.map +1 -0
  58. package/dist/es2020/encoder/encoder.js +220 -0
  59. package/dist/es2020/encoder/encoder.js.map +1 -0
  60. package/dist/es2020/enums/index.js +2 -0
  61. package/dist/es2020/enums/index.js.map +1 -0
  62. package/dist/es2020/enums/orderByDirection.js +15 -0
  63. package/dist/es2020/enums/orderByDirection.js.map +1 -0
  64. package/dist/es2020/index.js +10 -0
  65. package/dist/es2020/index.js.map +1 -0
  66. package/dist/es2020/indexNode.js +2 -0
  67. package/dist/es2020/indexNode.js.map +1 -0
  68. package/dist/es2020/initJsDevMode.js +8 -0
  69. package/dist/es2020/initJsDevMode.js.map +1 -0
  70. package/dist/es2020/jsDevMode.js +8 -0
  71. package/dist/es2020/jsDevMode.js.map +1 -0
  72. package/dist/es2020/normalizer/charMaps.js +20 -0
  73. package/dist/es2020/normalizer/charMaps.js.map +1 -0
  74. package/dist/es2020/normalizer/index.js +3 -0
  75. package/dist/es2020/normalizer/index.js.map +1 -0
  76. package/dist/es2020/normalizer/normalizer.js +14 -0
  77. package/dist/es2020/normalizer/normalizer.js.map +1 -0
  78. package/dist/es2020/paginator/paginator.js +230 -0
  79. package/dist/es2020/paginator/paginator.js.map +1 -0
  80. package/dist/es2020/types/dictionaries.js +2 -0
  81. package/dist/es2020/types/dictionaries.js.map +1 -0
  82. package/dist/es2020/types/enums.js +2 -0
  83. package/dist/es2020/types/enums.js.map +1 -0
  84. package/dist/es2020/types/functions.js +2 -0
  85. package/dist/es2020/types/functions.js.map +1 -0
  86. package/dist/es2020/types/index.js +5 -0
  87. package/dist/es2020/types/index.js.map +1 -0
  88. package/dist/es2020/types/valueNamePair.js +2 -0
  89. package/dist/es2020/types/valueNamePair.js.map +1 -0
  90. package/dist/es2020/utils/common.js +208 -0
  91. package/dist/es2020/utils/common.js.map +1 -0
  92. package/dist/es2020/utils/index.js +4 -0
  93. package/dist/es2020/utils/index.js.map +1 -0
  94. package/dist/es2020/utils/lang.js +79 -0
  95. package/dist/es2020/utils/lang.js.map +1 -0
  96. package/dist/es2020/utils/nameof.js +6 -0
  97. package/dist/es2020/utils/nameof.js.map +1 -0
  98. package/dist/es5/decorators/bindThis.decorator.js +24 -24
  99. package/dist/es5/decorators/bindThis.decorator.js.map +1 -0
  100. package/dist/es5/decorators/callOnce.decorator.js +33 -28
  101. package/dist/es5/decorators/callOnce.decorator.js.map +1 -0
  102. package/dist/es5/decorators/debounceCall.decorator.js +30 -27
  103. package/dist/es5/decorators/debounceCall.decorator.js.map +1 -0
  104. package/dist/es5/decorators/index.js +4 -4
  105. package/dist/es5/decorators/index.js.map +1 -0
  106. package/dist/es5/encoder/encoder.js +222 -233
  107. package/dist/es5/encoder/encoder.js.map +1 -0
  108. package/dist/es5/enums/index.js +2 -2
  109. package/dist/es5/enums/index.js.map +1 -0
  110. package/dist/es5/enums/orderByDirection.js +15 -15
  111. package/dist/es5/enums/orderByDirection.js.map +1 -0
  112. package/dist/es5/index.js +10 -24
  113. package/dist/es5/index.js.map +1 -0
  114. package/dist/es5/indexNode.js +2 -2
  115. package/dist/es5/indexNode.js.map +1 -0
  116. package/dist/es5/initJsDevMode.js +8 -0
  117. package/dist/es5/initJsDevMode.js.map +1 -0
  118. package/dist/es5/jsDevMode.js +8 -8
  119. package/dist/es5/jsDevMode.js.map +1 -0
  120. package/dist/es5/normalizer/charMaps.js +20 -35
  121. package/dist/es5/normalizer/charMaps.js.map +1 -0
  122. package/dist/es5/normalizer/index.js +3 -3
  123. package/dist/es5/normalizer/index.js.map +1 -0
  124. package/dist/es5/normalizer/normalizer.js +14 -14
  125. package/dist/es5/normalizer/normalizer.js.map +1 -0
  126. package/dist/es5/paginator/paginator.js +232 -226
  127. package/dist/es5/paginator/paginator.js.map +1 -0
  128. package/dist/es5/types/dictionaries.js +2 -1
  129. package/dist/es5/types/dictionaries.js.map +1 -0
  130. package/dist/es5/types/enums.js +2 -0
  131. package/dist/es5/types/enums.js.map +1 -0
  132. package/dist/es5/types/functions.js +2 -0
  133. package/dist/es5/types/functions.js.map +1 -0
  134. package/dist/es5/types/index.js +5 -3
  135. package/dist/es5/types/index.js.map +1 -0
  136. package/dist/es5/types/valueNamePair.js +2 -1
  137. package/dist/es5/types/valueNamePair.js.map +1 -0
  138. package/dist/es5/utils/common.js +220 -232
  139. package/dist/es5/utils/common.js.map +1 -0
  140. package/dist/es5/utils/index.js +4 -4
  141. package/dist/es5/utils/index.js.map +1 -0
  142. package/dist/es5/utils/lang.js +79 -79
  143. package/dist/es5/utils/lang.js.map +1 -0
  144. package/dist/es5/utils/nameof.js +6 -6
  145. package/dist/es5/utils/nameof.js.map +1 -0
  146. package/dist/module/decorators/bindThis.decorator.js +28 -28
  147. package/dist/module/decorators/bindThis.decorator.js.map +1 -0
  148. package/dist/module/decorators/callOnce.decorator.js +33 -32
  149. package/dist/module/decorators/callOnce.decorator.js.map +1 -0
  150. package/dist/module/decorators/debounceCall.decorator.js +29 -30
  151. package/dist/module/decorators/debounceCall.decorator.js.map +1 -0
  152. package/dist/module/decorators/index.js +7 -16
  153. package/dist/module/decorators/index.js.map +1 -0
  154. package/dist/module/encoder/encoder.js +224 -235
  155. package/dist/module/encoder/encoder.js.map +1 -0
  156. package/dist/module/enums/index.js +5 -14
  157. package/dist/module/enums/index.js.map +1 -0
  158. package/dist/module/enums/orderByDirection.js +18 -18
  159. package/dist/module/enums/orderByDirection.js.map +1 -0
  160. package/dist/module/index.js +13 -37
  161. package/dist/module/index.js.map +1 -0
  162. package/dist/module/indexNode.js +5 -14
  163. package/dist/module/indexNode.js.map +1 -0
  164. package/dist/module/initJsDevMode.js +10 -0
  165. package/dist/module/initJsDevMode.js.map +1 -0
  166. package/dist/module/jsDevMode.js +12 -12
  167. package/dist/module/jsDevMode.js.map +1 -0
  168. package/dist/module/normalizer/charMaps.js +23 -31
  169. package/dist/module/normalizer/charMaps.js.map +1 -0
  170. package/dist/module/normalizer/index.js +6 -15
  171. package/dist/module/normalizer/index.js.map +1 -0
  172. package/dist/module/normalizer/normalizer.js +18 -18
  173. package/dist/module/normalizer/normalizer.js.map +1 -0
  174. package/dist/module/paginator/paginator.js +234 -228
  175. package/dist/module/paginator/paginator.js.map +1 -0
  176. package/dist/module/types/dictionaries.js +3 -3
  177. package/dist/module/types/dictionaries.js.map +1 -0
  178. package/dist/module/types/enums.js +3 -0
  179. package/dist/module/types/enums.js.map +1 -0
  180. package/dist/module/types/functions.js +3 -0
  181. package/dist/module/types/functions.js.map +1 -0
  182. package/dist/module/types/index.js +8 -15
  183. package/dist/module/types/index.js.map +1 -0
  184. package/dist/module/types/valueNamePair.js +3 -3
  185. package/dist/module/types/valueNamePair.js.map +1 -0
  186. package/dist/module/utils/common.js +232 -240
  187. package/dist/module/utils/common.js.map +1 -0
  188. package/dist/module/utils/index.js +7 -16
  189. package/dist/module/utils/index.js.map +1 -0
  190. package/dist/module/utils/lang.js +99 -99
  191. package/dist/module/utils/lang.js.map +1 -0
  192. package/dist/module/utils/nameof.js +10 -9
  193. package/dist/module/utils/nameof.js.map +1 -0
  194. package/package.json +45 -16
  195. package/src/decorators/bindThis.decorator.d.ts +5 -7
  196. package/src/decorators/bindThis.decorator.d.ts.map +1 -1
  197. package/src/decorators/callOnce.decorator.d.ts +5 -5
  198. package/src/decorators/callOnce.decorator.d.ts.map +1 -1
  199. package/src/decorators/debounceCall.decorator.d.ts +5 -5
  200. package/src/decorators/debounceCall.decorator.d.ts.map +1 -1
  201. package/src/decorators/index.d.ts +3 -3
  202. package/src/encoder/encoder.d.ts +45 -45
  203. package/src/encoder/encoder.d.ts.map +1 -1
  204. package/src/enums/index.d.ts +1 -1
  205. package/src/enums/orderByDirection.d.ts +13 -13
  206. package/src/index.d.ts +9 -17
  207. package/src/index.d.ts.map +1 -1
  208. package/src/indexNode.d.ts +1 -1
  209. package/src/initJsDevMode.d.ts +2 -0
  210. package/src/initJsDevMode.d.ts.map +1 -0
  211. package/src/jsDevMode.d.ts +8 -8
  212. package/src/jsDevMode.d.ts.map +1 -1
  213. package/src/normalizer/charMaps.d.ts +5 -9
  214. package/src/normalizer/charMaps.d.ts.map +1 -1
  215. package/src/normalizer/index.d.ts +2 -2
  216. package/src/normalizer/normalizer.d.ts +7 -6
  217. package/src/normalizer/normalizer.d.ts.map +1 -1
  218. package/src/paginator/paginator.d.ts +129 -129
  219. package/src/paginator/paginator.d.ts.map +1 -1
  220. package/src/types/dictionaries.d.ts +15 -6
  221. package/src/types/dictionaries.d.ts.map +1 -1
  222. package/src/types/enums.d.ts +7 -0
  223. package/src/types/enums.d.ts.map +1 -0
  224. package/src/types/functions.d.ts +14 -0
  225. package/src/types/functions.d.ts.map +1 -0
  226. package/src/types/index.d.ts +4 -2
  227. package/src/types/index.d.ts.map +1 -1
  228. package/src/types/valueNamePair.d.ts +13 -13
  229. package/src/utils/common.d.ts +181 -122
  230. package/src/utils/common.d.ts.map +1 -1
  231. package/src/utils/index.d.ts +3 -3
  232. package/src/utils/lang.d.ts +41 -41
  233. package/src/utils/lang.d.ts.map +1 -1
  234. package/src/utils/nameof.d.ts +5 -5
  235. package/src/utils/nameof.d.ts.map +1 -1
  236. package/version.bak +1 -1
  237. package/.jsbeautifyrc +0 -7
  238. package/appveyor.yml +0 -67
@@ -1,99 +1,99 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmptyObject = exports.hasConstructor = exports.isPrimitive = exports.isJsObject = exports.normalizeBlank = exports.noop = exports.isDate = exports.isArray = exports.isStrictStringMap = exports.isStringMap = exports.isType = exports.isFunction = exports.isString = exports.isNumber = exports.isBoolean = exports.isBlank = exports.isPresent = void 0;
4
- /**
5
- * Tests whether is object not `null` and not `undefined` at the same time
6
- * @param obj - Object to be tested
7
- */
8
- function isPresent(obj) {
9
- return obj !== undefined && obj !== null;
10
- }
11
- exports.isPresent = isPresent;
12
- /**
13
- * Tests whether is object `null` or `undefined`
14
- * @param obj - Object to be tested
15
- */
16
- function isBlank(obj) {
17
- return obj === undefined || obj === null;
18
- }
19
- exports.isBlank = isBlank;
20
- /**
21
- * Tests whether is object instance of `boolean`
22
- * @param obj - Object to be tested
23
- */
24
- function isBoolean(obj) {
25
- return typeof obj === 'boolean';
26
- }
27
- exports.isBoolean = isBoolean;
28
- /**
29
- * Tests whether is object instance of number
30
- * @param obj - Object to be tested
31
- */
32
- function isNumber(obj) {
33
- return typeof obj === 'number';
34
- }
35
- exports.isNumber = isNumber;
36
- /**
37
- * Tests whether is object instance of string
38
- * @param obj - Object to be tested
39
- */
40
- function isString(obj) {
41
- return typeof obj === 'string';
42
- }
43
- exports.isString = isString;
44
- /**
45
- * Tests whether is object instance of function
46
- * @param obj - Object to be tested
47
- */
48
- function isFunction(obj) {
49
- return typeof obj === 'function';
50
- }
51
- exports.isFunction = isFunction;
52
- function isType(obj) {
53
- return isFunction(obj);
54
- }
55
- exports.isType = isType;
56
- function isStringMap(obj) {
57
- return typeof obj === 'object' && obj !== null;
58
- }
59
- exports.isStringMap = isStringMap;
60
- const STRING_MAP_PROTO = Object.getPrototypeOf({});
61
- function isStrictStringMap(obj) {
62
- return isStringMap(obj) && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
63
- }
64
- exports.isStrictStringMap = isStrictStringMap;
65
- function isArray(obj) {
66
- return Array.isArray(obj);
67
- }
68
- exports.isArray = isArray;
69
- function isDate(obj) {
70
- return obj instanceof Date && !isNaN(obj.valueOf());
71
- }
72
- exports.isDate = isDate;
73
- function noop() {
74
- }
75
- exports.noop = noop;
76
- function normalizeBlank(obj) {
77
- return isBlank(obj) ? null : obj;
78
- }
79
- exports.normalizeBlank = normalizeBlank;
80
- function isJsObject(o) {
81
- return o !== null && (typeof o === 'function' || typeof o === 'object');
82
- }
83
- exports.isJsObject = isJsObject;
84
- function isPrimitive(obj) {
85
- return !isJsObject(obj);
86
- }
87
- exports.isPrimitive = isPrimitive;
88
- function hasConstructor(value, type) {
89
- return value.constructor === type;
90
- }
91
- exports.hasConstructor = hasConstructor;
92
- function isEmptyObject(obj) {
93
- for (let _name in obj) {
94
- return false;
95
- }
96
- return true;
97
- }
98
- exports.isEmptyObject = isEmptyObject;
99
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFuZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9sYW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7R0FHRztBQUNILFNBQWdCLFNBQVMsQ0FBTyxHQUFTO0lBRXJDLE9BQU8sR0FBRyxLQUFLLFNBQVMsSUFBSSxHQUFHLEtBQUssSUFBSSxDQUFDO0FBQzdDLENBQUM7QUFIRCw4QkFHQztBQUVEOzs7R0FHRztBQUNILFN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9uJyB8fCB0eXBlb2YgbyA9PT0gJ29iamVjdCcpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gaXNQcmltaXRpdmUob2JqOiBhbnkpOiBib29sZWFuXHJcbntcclxuICAgIHJldHVybiAhaXNKc09iamVjdChvYmopO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gaGFzQ29uc3RydWN0b3IodmFsdWU6IE9iamVjdCwgdHlwZTogYW55KTogYm9vbGVhblxyXG57XHJcbiAgICByZXR1cm4gdmFsdWUuY29uc3RydWN0b3IgPT09IHR5cGU7XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBpc0VtcHR5T2JqZWN0KG9iajogYW55KTogYm9vbGVhblxyXG57XHJcbiAgICBmb3IgKGxldCBfbmFtZSBpbiBvYmopXHJcbiAgICB7XHJcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiB0cnVlO1xyXG59Il19
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isEmptyObject = exports.hasConstructor = exports.isPrimitive = exports.isJsObject = exports.normalizeBlank = exports.noop = exports.isDate = exports.isArray = exports.isStrictStringMap = exports.isStringMap = exports.isType = exports.isFunction = exports.isString = exports.isNumber = exports.isBoolean = exports.isBlank = exports.isPresent = void 0;
4
+ /**
5
+ * Tests whether is object not `null` and not `undefined` at the same time
6
+ * @param obj - Object to be tested
7
+ */
8
+ function isPresent(obj) {
9
+ return obj !== undefined && obj !== null;
10
+ }
11
+ exports.isPresent = isPresent;
12
+ /**
13
+ * Tests whether is object `null` or `undefined`
14
+ * @param obj - Object to be tested
15
+ */
16
+ function isBlank(obj) {
17
+ return obj === undefined || obj === null;
18
+ }
19
+ exports.isBlank = isBlank;
20
+ /**
21
+ * Tests whether is object instance of `boolean`
22
+ * @param obj - Object to be tested
23
+ */
24
+ function isBoolean(obj) {
25
+ return typeof obj === 'boolean';
26
+ }
27
+ exports.isBoolean = isBoolean;
28
+ /**
29
+ * Tests whether is object instance of number
30
+ * @param obj - Object to be tested
31
+ */
32
+ function isNumber(obj) {
33
+ return typeof obj === 'number';
34
+ }
35
+ exports.isNumber = isNumber;
36
+ /**
37
+ * Tests whether is object instance of string
38
+ * @param obj - Object to be tested
39
+ */
40
+ function isString(obj) {
41
+ return typeof obj === 'string';
42
+ }
43
+ exports.isString = isString;
44
+ /**
45
+ * Tests whether is object instance of function
46
+ * @param obj - Object to be tested
47
+ */
48
+ function isFunction(obj) {
49
+ return typeof obj === 'function';
50
+ }
51
+ exports.isFunction = isFunction;
52
+ function isType(obj) {
53
+ return isFunction(obj);
54
+ }
55
+ exports.isType = isType;
56
+ function isStringMap(obj) {
57
+ return typeof obj === 'object' && obj !== null;
58
+ }
59
+ exports.isStringMap = isStringMap;
60
+ const STRING_MAP_PROTO = Object.getPrototypeOf({});
61
+ function isStrictStringMap(obj) {
62
+ return isStringMap(obj) && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
63
+ }
64
+ exports.isStrictStringMap = isStrictStringMap;
65
+ function isArray(obj) {
66
+ return Array.isArray(obj);
67
+ }
68
+ exports.isArray = isArray;
69
+ function isDate(obj) {
70
+ return obj instanceof Date && !isNaN(obj.valueOf());
71
+ }
72
+ exports.isDate = isDate;
73
+ function noop() {
74
+ }
75
+ exports.noop = noop;
76
+ function normalizeBlank(obj) {
77
+ return isBlank(obj) ? null : obj;
78
+ }
79
+ exports.normalizeBlank = normalizeBlank;
80
+ function isJsObject(o) {
81
+ return o !== null && (typeof o === 'function' || typeof o === 'object');
82
+ }
83
+ exports.isJsObject = isJsObject;
84
+ function isPrimitive(obj) {
85
+ return !isJsObject(obj);
86
+ }
87
+ exports.isPrimitive = isPrimitive;
88
+ function hasConstructor(value, type) {
89
+ return value.constructor === type;
90
+ }
91
+ exports.hasConstructor = hasConstructor;
92
+ function isEmptyObject(obj) {
93
+ for (const _name in obj) {
94
+ return false;
95
+ }
96
+ return true;
97
+ }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,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC;AAC/E,CAAC;AAHD,8CAGC;AAED,SAAgB,OAAO,CAAC,GAAQ;IAE5B,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAHD,0BAGC;AAED,SAAgB,MAAM,CAAC,GAAQ;IAE3B,OAAO,GAAG,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;AACxD,CAAC;AAHD,wBAGC;AAED,SAAgB,IAAI;AAGpB,CAAC;AAHD,oBAGC;AAED,SAAgB,cAAc,CAAsB,GAAwB;IAExE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;AACrC,CAAC;AAHD,wCAGC;AAED,SAAgB,UAAU,CAAC,CAAM;IAE7B,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAHD,gCAGC;AAED,SAAgB,WAAW,CAAC,GAAQ;IAEhC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAHD,kCAGC;AAED,SAAgB,cAAc,CAAC,KAAa,EAAE,IAAS;IAEnD,OAAO,KAAK,CAAC,WAAW,KAAK,IAAI,CAAC;AACtC,CAAC;AAHD,wCAGC;AAED,SAAgB,aAAa,CAAC,GAAQ;IAElC,KAAK,MAAM,KAAK,IAAI,GAAG,EACvB;QACI,OAAO,KAAK,CAAC;KAChB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AARD,sCAQC","sourcesContent":["/**\r\n * Tests whether is object not `null` and not `undefined` at the same time\r\n * @param obj - Object to be tested\r\n */\r\nexport function isPresent<TObj>(obj: TObj): obj is NonNullable<TObj>\r\n{\r\n return obj !== undefined && obj !== null;\r\n}\r\n\r\n/**\r\n * Tests whether is object `null` or `undefined`\r\n * @param obj - Object to be tested\r\n */\r\nexport function isBlank(obj: any): obj is null|undefined\r\n{\r\n return obj === undefined || obj === null;\r\n}\r\n\r\n/**\r\n * Tests whether is object instance of `boolean`\r\n * @param obj - Object to be tested\r\n */\r\nexport function isBoolean(obj: any): obj is boolean\r\n{\r\n return typeof obj === 'boolean';\r\n}\r\n\r\n/**\r\n * Tests whether is object instance of number\r\n * @param obj - Object to be tested\r\n */\r\nexport function isNumber(obj: any): obj is number\r\n{\r\n return typeof obj === 'number';\r\n}\r\n\r\n/**\r\n * Tests whether is object instance of string\r\n * @param obj - Object to be tested\r\n */\r\nexport function isString(obj: any): obj is string\r\n{\r\n return typeof obj === 'string';\r\n}\r\n\r\n/**\r\n * Tests whether is object instance of function\r\n * @param obj - Object to be tested\r\n */\r\nexport function isFunction(obj: any): obj is Function\r\n{\r\n return typeof obj === 'function';\r\n}\r\n\r\nexport function isType(obj: any): obj is Function\r\n{\r\n return isFunction(obj);\r\n}\r\n\r\nexport function isStringMap(obj: any): obj is Object\r\n{\r\n return typeof obj === 'object' && obj !== null;\r\n}\r\n\r\nconst STRING_MAP_PROTO = Object.getPrototypeOf({});\r\n\r\nexport function isStrictStringMap(obj: any): boolean\r\n{\r\n return isStringMap(obj) && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;\r\n}\r\n\r\nexport function isArray(obj: any): obj is Array<any>\r\n{\r\n return Array.isArray(obj);\r\n}\r\n\r\nexport function isDate(obj: any): obj is Date\r\n{\r\n return obj instanceof Date && !isNaN(obj.valueOf());\r\n}\r\n\r\nexport function noop(): void\r\n// eslint-disable-next-line @typescript-eslint/no-empty-function\r\n{\r\n}\r\n\r\nexport function normalizeBlank<TObj extends Object>(obj: TObj|undefined|null): TObj|null\r\n{\r\n return isBlank(obj) ? null : obj;\r\n}\r\n\r\nexport function isJsObject(o: any): o is Function|Object\r\n{\r\n return o !== null && (typeof o === 'function' || typeof o === 'object');\r\n}\r\n\r\nexport function isPrimitive(obj: any): boolean\r\n{\r\n return !isJsObject(obj);\r\n}\r\n\r\nexport function hasConstructor(value: Object, type: any): boolean\r\n{\r\n return value.constructor === type;\r\n}\r\n\r\nexport function isEmptyObject(obj: any): boolean\r\n{\r\n for (const _name in obj)\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n}"]}
@@ -1,9 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nameof = void 0;
4
- /**
5
- * Returns name of property, checked by typescript
6
- * @param name - Name of property that should be returned
7
- */
8
- exports.nameof = (name) => name;
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmFtZW9mLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3V0aWxzL25hbWVvZi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7O0dBR0c7QUFDVSxRQUFBLE1BQU0sR0FBRyxDQUFJLElBQWEsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXHJcbiAqIFJldHVybnMgbmFtZSBvZiBwcm9wZXJ0eSwgY2hlY2tlZCBieSB0eXBlc2NyaXB0XHJcbiAqIEBwYXJhbSBuYW1lIC0gTmFtZSBvZiBwcm9wZXJ0eSB0aGF0IHNob3VsZCBiZSByZXR1cm5lZFxyXG4gKi9cclxuZXhwb3J0IGNvbnN0IG5hbWVvZiA9IDxUPihuYW1lOiBrZXlvZiBUKSA9PiBuYW1lOyJdfQ==
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nameof = void 0;
4
+ /**
5
+ * Returns name of property, checked by typescript
6
+ * @param name - Name of property that should be returned
7
+ */
8
+ const nameof = (name) => name;
9
+ exports.nameof = nameof;
10
+ //# sourceMappingURL=nameof.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nameof.js","sourceRoot":"","sources":["../../../src/utils/nameof.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACI,MAAM,MAAM,GAAG,CAAI,IAA8B,EAAU,EAAE,CAAC,IAAI,CAAC;AAA7D,QAAA,MAAM,UAAuD","sourcesContent":["/**\r\n * Returns name of property, checked by typescript\r\n * @param name - Name of property that should be returned\r\n */\r\nexport const nameof = <T>(name: Extract<keyof T, string>): string => name;"]}
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "@jscrpt/common",
3
- "version": "1.2.0",
3
+ "version": "2.0.0-beta.20211108120022",
4
4
  "description": "Common javascript tools, utilities and other usefull stuff",
5
- "main": "./dist/module/indexNode.js",
6
- "module": "./dist/module/indexNode.js",
7
- "browser": "./dist/es5/index.js",
8
- "esm2015": "./dist/es2015/index.js",
9
- "typings": "./src/index.d.ts",
10
- "sideEffects": false,
5
+ "type": "module",
6
+ "sideEffects": [
7
+ "dist/*/initJsDevMode.js"
8
+ ],
11
9
  "scripts": {
12
- "build": "npm run tsc && npm run tsc -- -t es2015 --outDir dist/es2015 && npm run tsc -- -t es2015 --outDir dist/module -m CommonJS",
13
- "clean": "rimraf dist src/**/*.d.ts src/**/*.d.ts.map",
10
+ "build": "npm run tsc && npm run tsc -- -t es2015 --outDir dist/es2015 && npm run tsc -- -t es2020 --outDir dist/es2020 && npm run tsc -- -t es2015 --outDir dist/module -m CommonJS",
11
+ "clean": "rimraf temp dist **/tsdoc-metadata.json src/**/*.d.ts src/**/*.d.ts.map ./*.d.ts ./*d.ts.map",
14
12
  "clean:deps": "rimraf package-lock.json node_modules",
15
13
  "clean:all": "npm run clean && npm run clean:deps",
16
14
  "tsc": "tsc",
@@ -29,6 +27,9 @@
29
27
  "doc:json:common": "api-extractor run --local --verbose -c api-extractor.json",
30
28
  "doc:md:common": "api-documenter markdown -i temp -o docs/content/api/js-common && rimraf temp"
31
29
  },
30
+ "engines": {
31
+ "node": "^12.20.0 || ^14.15.0 || >=16.10.0"
32
+ },
32
33
  "repository": {
33
34
  "type": "git",
34
35
  "url": "https://github.com/ressurectit/js-common.git"
@@ -50,13 +51,41 @@
50
51
  },
51
52
  "devDependencies": {
52
53
  "@types/extend": "^3.0.1",
53
- "@microsoft/api-extractor": "7.9.1",
54
- "@microsoft/api-documenter": "7.8.21",
54
+ "@microsoft/api-extractor": "7.18.19",
55
+ "@microsoft/api-documenter": "7.13.67",
56
+ "tslib": "2.3.1",
57
+ "eslint": "7.32.0",
58
+ "@typescript-eslint/eslint-plugin": "4.33.0",
59
+ "@typescript-eslint/parser": "4.33.0",
55
60
  "rimraf": "3.0.2",
56
- "copyfiles": "2.3.0",
57
- "replace-in-file": "6.1.0",
58
- "path-exists-cli": "1.0.0",
59
- "typescript": "3.9.7",
60
- "npm-git-version": "1.1.1"
61
+ "copyfiles": "2.4.1",
62
+ "replace-in-file": "6.3.2",
63
+ "path-exists-cli": "2.0.0",
64
+ "typescript": "4.4.4",
65
+ "npm-git-version": "2.0.0"
66
+ },
67
+ "main": "./dist/module/indexNode.js",
68
+ "module": "./dist/module/indexNode.js",
69
+ "browser": "./dist/es2015/index.js",
70
+ "esm2015": "./dist/es2015/index.js",
71
+ "es2020": "./dist/es2020/index.js",
72
+ "esm2020": "./dist/es2020/index.js",
73
+ "typings": "./src/index.d.ts",
74
+ "exports": {
75
+ "./package.json": {
76
+ "default": "./package.json"
77
+ },
78
+ ".": {
79
+ "types": "./src/index.d.ts",
80
+ "es5": "./dist/es5/index.js",
81
+ "es2015": "./dist/es2015/index.js",
82
+ "es2020": "./dist/es2020/index.js",
83
+ "esm2020": "./dist/es2020/index.js",
84
+ "node": {
85
+ "require": "./dist/module/indexNode.js"
86
+ },
87
+ "browser": "./dist/es2015/index.js",
88
+ "default": "./dist/es2020/index.js"
89
+ }
61
90
  }
62
91
  }
@@ -1,8 +1,6 @@
1
- /**
2
- * Binds function to this, object instance where is defined, it is importat to place it in correct order with other decorators, usually should be first
3
- */
4
- export declare function BindThis(_target: Object, propertyKey: string, descriptor: PropertyDescriptor): {
5
- configurable: boolean;
6
- get(this: any): any;
7
- };
1
+ import { Func } from '../types';
2
+ /**
3
+ * Binds function to this, object instance where is defined, it is importat to place it in correct order with other decorators, usually should be first
4
+ */
5
+ export declare function BindThis(_target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): TypedPropertyDescriptor<Func>;
8
6
  //# sourceMappingURL=bindThis.decorator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bindThis.decorator.d.ts","sourceRoot":"","sources":["bindThis.decorator.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB;;cAW3E,GAAG,GAAG,GAAG;EAe1B"}
1
+ {"version":3,"file":"bindThis.decorator.d.ts","sourceRoot":"","sources":["bindThis.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,UAAU,CAAC;AAG9B;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAC,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,uBAAuB,CAAC,IAAI,CAAC,CA0BnI"}
@@ -1,6 +1,6 @@
1
- /**
2
- * Method is called only once for specified time, other calls during this time are blocked and it does nothing and returns null
3
- * @param time - Number of miliseconds which specifies period while are calls to this method blocked after first call
4
- */
5
- export declare function CallOnce(time: number): MethodDecorator;
1
+ /**
2
+ * Method is called only once for specified time, other calls during this time are blocked and it does nothing and returns null
3
+ * @param time - Number of miliseconds which specifies period while are calls to this method blocked after first call
4
+ */
5
+ export declare function CallOnce(time: number): MethodDecorator;
6
6
  //# sourceMappingURL=callOnce.decorator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callOnce.decorator.d.ts","sourceRoot":"","sources":["callOnce.decorator.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAgCtD"}
1
+ {"version":3,"file":"callOnce.decorator.d.ts","sourceRoot":"","sources":["callOnce.decorator.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAkCtD"}
@@ -1,6 +1,6 @@
1
- /**
2
- * Adds special functionality to method call, that debounce method call for specified time
3
- * @param delay - Number of miliseconds that delays function call
4
- */
5
- export declare function DebounceCall(delay: number): MethodDecorator;
1
+ /**
2
+ * Adds special functionality to method call, that debounce method call for specified time
3
+ * @param delay - Number of miliseconds that delays function call
4
+ */
5
+ export declare function DebounceCall(delay: number): MethodDecorator;
6
6
  //# sourceMappingURL=debounceCall.decorator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"debounceCall.decorator.d.ts","sourceRoot":"","sources":["debounceCall.decorator.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CA6B3D"}
1
+ {"version":3,"file":"debounceCall.decorator.d.ts","sourceRoot":"","sources":["debounceCall.decorator.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CA2B3D"}
@@ -1,4 +1,4 @@
1
- export * from './bindThis.decorator';
2
- export * from './callOnce.decorator';
3
- export * from './debounceCall.decorator';
1
+ export * from './bindThis.decorator';
2
+ export * from './callOnce.decorator';
3
+ export * from './debounceCall.decorator';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,46 +1,46 @@
1
- /**
2
- * A Javascript object to encode and/or decode html characters using HTML or Numeric entities that handles double or partial encoding
3
- * Author: R Reid
4
- * source: http://www.strictly-software.com/htmlencode
5
- * Licences: GPL, The MIT License (MIT)
6
- * Copyright: (c) 2011 Robert Reid - Strictly-Software.com
7
- *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11
- *
12
- * Revision:
13
- * 2011-07-14, Jacques-Yves Bleau:
14
- * - fixed conversion error with capitalized accentuated characters
15
- * + converted arr1 and arr2 to object property to remove redundancy
16
- *
17
- * Revision:
18
- * 2011-11-10, Ce-Yi Hio:
19
- * - fixed conversion error with a number of capitalized entity characters
20
- *
21
- * Revision:
22
- * 2011-11-10, Rob Reid:
23
- * - changed array format
24
- *
25
- * Revision:
26
- * 2012-09-23, Alex Oss:
27
- * - replaced string concatonation in numEncode with string builder, push and join for peformance with ammendments by Rob Reid
28
- */
29
- export declare class Encoder {
30
- EncodeType: string;
31
- isEmpty(val: any): boolean;
32
- arr1: string[];
33
- arr2: string[];
34
- HTML2Numerical(s: any): any;
35
- NumericalToHTML(s: any): any;
36
- numEncode(s: any): string;
37
- htmlDecode(s: any): any;
38
- htmlEncode(s: any, dbl: any): any;
39
- XSSEncode(s: any, en: any): any;
40
- hasEncoded(s: any): boolean;
41
- stripUnicode(s: any): any;
42
- correctEncoding(s: any): any;
43
- swapArrayVals(s: any, arr1: any, arr2: any): any;
44
- inArray(item: any, arr: any): number;
45
- }
1
+ /**
2
+ * A Javascript object to encode and/or decode html characters using HTML or Numeric entities that handles double or partial encoding
3
+ * Author: R Reid
4
+ * source: http://www.strictly-software.com/htmlencode
5
+ * Licences: GPL, The MIT License (MIT)
6
+ * Copyright: (c) 2011 Robert Reid - Strictly-Software.com
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11
+ *
12
+ * Revision:
13
+ * 2011-07-14, Jacques-Yves Bleau:
14
+ * - fixed conversion error with capitalized accentuated characters
15
+ * + converted arr1 and arr2 to object property to remove redundancy
16
+ *
17
+ * Revision:
18
+ * 2011-11-10, Ce-Yi Hio:
19
+ * - fixed conversion error with a number of capitalized entity characters
20
+ *
21
+ * Revision:
22
+ * 2011-11-10, Rob Reid:
23
+ * - changed array format
24
+ *
25
+ * Revision:
26
+ * 2012-09-23, Alex Oss:
27
+ * - replaced string concatonation in numEncode with string builder, push and join for peformance with ammendments by Rob Reid
28
+ */
29
+ export declare class Encoder {
30
+ EncodeType: string;
31
+ isEmpty(val: any): boolean;
32
+ arr1: string[];
33
+ arr2: string[];
34
+ HTML2Numerical(s: any): any;
35
+ NumericalToHTML(s: any): any;
36
+ numEncode(s: any): string;
37
+ htmlDecode(s: any): any;
38
+ htmlEncode(s: any, dbl: any): any;
39
+ XSSEncode(s: any, en: any): any;
40
+ hasEncoded(s: any): boolean;
41
+ stripUnicode(s: any): any;
42
+ correctEncoding(s: any): any;
43
+ swapArrayVals(s: any, arr1: any, arr2: any): any;
44
+ inArray(item: any, arr: any): number;
45
+ }
46
46
  //# sourceMappingURL=encoder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["encoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,qBAAa,OAAO;IAGnB,UAAU,EAAE,MAAM,CAAY;IAE9B,OAAO,CAAC,GAAG,EAAC,GAAG;IAaf,IAAI,EAAE,MAAM,EAAE,CAA63E;IAC34E,IAAI,EAAE,MAAM,EAAE,CAAyzE;IAGv0E,cAAc,CAAC,CAAC,EAAC,GAAG;IAMpB,eAAe,CAAC,CAAC,EAAC,GAAG;IAOrB,SAAS,CAAC,CAAC,EAAC,GAAG;IA8Bf,UAAU,CAAC,CAAC,EAAC,GAAG;IAuChB,UAAU,CAAC,CAAC,EAAC,GAAG,EAAE,GAAG,EAAC,GAAG;IA4EzB,SAAS,CAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG;IA8BtB,UAAU,CAAC,CAAC,EAAC,GAAG;IAiBhB,YAAY,CAAC,CAAC,EAAC,GAAG;IAMlB,eAAe,CAAC,CAAC,EAAC,GAAG;IAMrB,aAAa,CAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG;IA0BrC,OAAO,CAAE,IAAI,EAAC,GAAG,EAAE,GAAG,EAAC,GAAG;CAa1B"}
1
+ {"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["encoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,qBAAa,OAAO;IAGhB,UAAU,EAAE,MAAM,CAAY;IAE9B,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAa1B,IAAI,EAAE,MAAM,EAAE,CAA63E;IAC34E,IAAI,EAAE,MAAM,EAAE,CAAyzE;IAGv0E,cAAc,CAAC,CAAC,EAAC,GAAG;IAMpB,eAAe,CAAC,CAAC,EAAC,GAAG;IAOrB,SAAS,CAAC,CAAC,EAAC,GAAG;IA8Bf,UAAU,CAAC,CAAC,EAAC,GAAG;IAuChB,UAAU,CAAC,CAAC,EAAC,GAAG,EAAE,GAAG,EAAC,GAAG;IA4EzB,SAAS,CAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG;IA8BtB,UAAU,CAAC,CAAC,EAAC,GAAG;IAiBhB,YAAY,CAAC,CAAC,EAAC,GAAG;IAMlB,eAAe,CAAC,CAAC,EAAC,GAAG;IAMrB,aAAa,CAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG;IA0BrC,OAAO,CAAE,IAAI,EAAC,GAAG,EAAE,GAAG,EAAC,GAAG;CAa7B"}
@@ -1,2 +1,2 @@
1
- export * from './orderByDirection';
1
+ export * from './orderByDirection';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,14 +1,14 @@
1
- /**
2
- * Directions for ordering
3
- */
4
- export declare enum OrderByDirection {
5
- /**
6
- * Items are ordered ascending
7
- */
8
- Ascendant = 0,
9
- /**
10
- * Items are ordered descending
11
- */
12
- Descendant = 1
13
- }
1
+ /**
2
+ * Directions for ordering
3
+ */
4
+ export declare enum OrderByDirection {
5
+ /**
6
+ * Items are ordered ascending
7
+ */
8
+ Ascending = 0,
9
+ /**
10
+ * Items are ordered descending
11
+ */
12
+ Descending = 1
13
+ }
14
14
  //# sourceMappingURL=orderByDirection.d.ts.map
package/src/index.d.ts CHANGED
@@ -1,18 +1,10 @@
1
- import { globalDefine as globalDefineFunc } from './jsDevMode';
2
- /**
3
- * Initialize jsDevMode global variable
4
- */
5
- export declare const initializeJsDevMode: () => void;
6
- /**
7
- * Defines global variable
8
- * @param globalDefineFunc - Global variable definition callback
9
- */
10
- export declare const globalDefine: typeof globalDefineFunc;
11
- export * from './encoder/encoder';
12
- export * from './paginator/paginator';
13
- export * from './normalizer';
14
- export * from './enums';
15
- export * from './types';
16
- export * from './utils';
17
- export * from './decorators';
1
+ import './initJsDevMode';
2
+ export * from './jsDevMode';
3
+ export * from './encoder/encoder';
4
+ export * from './paginator/paginator';
5
+ export * from './normalizer';
6
+ export * from './enums';
7
+ export * from './types';
8
+ export * from './utils';
9
+ export * from './decorators';
18
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,IAAI,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAW7D;;GAEG;AACH,eAAO,MAAM,mBAAmB,YAAW,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,YAAY,yBAAmB,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAEzB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './index';
1
+ export * from './index';
2
2
  //# sourceMappingURL=indexNode.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=initJsDevMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initJsDevMode.d.ts","sourceRoot":"","sources":["initJsDevMode.ts"],"names":[],"mappings":""}
@@ -1,9 +1,9 @@
1
- declare global {
2
- const jsDevMode: boolean;
3
- }
4
- /**
5
- * Defines global variable
6
- * @param globalDefineFunc - Global variable definition callback
7
- */
8
- export declare function globalDefine(globalDefineFunc: (global: any) => void): void;
1
+ declare global {
2
+ const jsDevMode: boolean;
3
+ }
4
+ /**
5
+ * Defines global variable
6
+ * @param globalDefineFunc - Global variable definition callback
7
+ */
8
+ export declare function globalDefine(globalDefineFunc: (global: any) => void): void;
9
9
  //# sourceMappingURL=jsDevMode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsDevMode.d.ts","sourceRoot":"","sources":["jsDevMode.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CACd;IACI,MAAM,SAAS,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,QAGnE"}
1
+ {"version":3,"file":"jsDevMode.d.ts","sourceRoot":"","sources":["jsDevMode.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CACd;IACI,MAAM,SAAS,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAG1E"}
@@ -1,10 +1,6 @@
1
- /**
2
- * Available char maps
3
- */
4
- export declare class NormalizationCharMaps {
5
- /**
6
- * Gets char map for slovak language
7
- */
8
- static get slovak(): Object;
9
- }
1
+ import { StringDictionary } from '../types';
2
+ /**
3
+ * Char map for slovak language
4
+ */
5
+ export declare const SlovakCharmap: StringDictionary;
10
6
  //# sourceMappingURL=charMaps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"charMaps.d.ts","sourceRoot":"","sources":["charMaps.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,qBAAqB;IAE9B;;OAEG;IACH,WAAkB,MAAM,IAAI,MAAM,CAkBjC;CACJ"}
1
+ {"version":3,"file":"charMaps.d.ts","sourceRoot":"","sources":["charMaps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,gBAgB3B,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from './charMaps';
2
- export * from './normalizer';
1
+ export * from './charMaps';
2
+ export * from './normalizer';
3
3
  //# sourceMappingURL=index.d.ts.map