@webalternatif/js-core 1.4.0 → 1.4.1

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/dist/cjs/index.js CHANGED
@@ -16,15 +16,13 @@ import * as utils from './utils.js';
16
16
  import * as i18n from './Translator.js';
17
17
  import eventDispatcher from './eventDispatcher.js';
18
18
  import Mouse from './Mouse.js';
19
- var webf = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, stringFunctions), arrayFunctions), traversal), is), random), {}, {
19
+ import Translator from './Translator.js';
20
+ var webf = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, stringFunctions), arrayFunctions), traversal), is), random), {}, {
20
21
  dom: dom,
21
22
  isWindow: isWindow,
22
23
  isDocument: isDocument,
23
24
  isDomElement: isDomElement,
24
25
  getStyle: getStyle
25
- }, math), utils), i18n), {}, {
26
- eventDispatcher: eventDispatcher,
27
- Mouse: Mouse
28
- });
26
+ }, math), utils), i18n);
29
27
  export default webf;
30
- export { stringFunctions, arrayFunctions, traversal, is, random, getStyle, dom, math, utils, eventDispatcher, Mouse };
28
+ export { stringFunctions, arrayFunctions, traversal, is, random, getStyle, dom, math, utils, eventDispatcher, Mouse, Translator };
@@ -1,6 +1,6 @@
1
- import { each } from "./traversal.js";
1
+ import { foreach } from "./traversal.js";
2
2
  import * as stringFunctions from "./string.js";
3
- each(Object.keys(stringFunctions), function (i, name) {
3
+ foreach(Object.keys(stringFunctions), function (name) {
4
4
  var f = stringFunctions[name],
5
5
  p = String.prototype;
6
6
  var origSF = p[name];
@@ -11,7 +11,7 @@ import { sizeOf } from "./utils.js";
11
11
 
12
12
  /**
13
13
  * @template T
14
- * @typedef {Array<T> | Set<T> | Map<any, T> | Object<string, T> | string} Collection
14
+ * @typedef {Array<T> | Set<T> | Map<any, T> | Object<string, T> | string | string[]} Collection
15
15
  */
16
16
 
17
17
  /**
package/dist/esm/index.js CHANGED
@@ -16,15 +16,13 @@ import * as utils from './utils.js';
16
16
  import * as i18n from './Translator.js';
17
17
  import eventDispatcher from './eventDispatcher.js';
18
18
  import Mouse from './Mouse.js';
19
- var webf = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, stringFunctions), arrayFunctions), traversal), is), random), {}, {
19
+ import Translator from './Translator.js';
20
+ var webf = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, stringFunctions), arrayFunctions), traversal), is), random), {}, {
20
21
  dom: dom,
21
22
  isWindow: isWindow,
22
23
  isDocument: isDocument,
23
24
  isDomElement: isDomElement,
24
25
  getStyle: getStyle
25
- }, math), utils), i18n), {}, {
26
- eventDispatcher: eventDispatcher,
27
- Mouse: Mouse
28
- });
26
+ }, math), utils), i18n);
29
27
  export default webf;
30
- export { stringFunctions, arrayFunctions, traversal, is, random, getStyle, dom, math, utils, eventDispatcher, Mouse };
28
+ export { stringFunctions, arrayFunctions, traversal, is, random, getStyle, dom, math, utils, eventDispatcher, Mouse, Translator };
@@ -1,6 +1,6 @@
1
- import { each } from "./traversal.js";
1
+ import { foreach } from "./traversal.js";
2
2
  import * as stringFunctions from "./string.js";
3
- each(Object.keys(stringFunctions), function (i, name) {
3
+ foreach(Object.keys(stringFunctions), function (name) {
4
4
  var f = stringFunctions[name],
5
5
  p = String.prototype;
6
6
  var origSF = p[name];
@@ -11,7 +11,7 @@ import { sizeOf } from "./utils.js";
11
11
 
12
12
  /**
13
13
  * @template T
14
- * @typedef {Array<T> | Set<T> | Map<any, T> | Object<string, T> | string} Collection
14
+ * @typedef {Array<T> | Set<T> | Map<any, T> | Object<string, T> | string | string[]} Collection
15
15
  */
16
16
 
17
17
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webalternatif/js-core",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "types": "types/index.d.ts",
6
6
  "main": "dist/cjs/index.js",
package/types/index.d.ts CHANGED
@@ -1,16 +1,5 @@
1
1
  export default webf;
2
2
  declare const webf: {
3
- eventDispatcher: {
4
- "__#3@#listeners": {};
5
- addListener(eventsName: any, callback: any, context: any, ...args: any[]): /*elided*/ any;
6
- addListenerOnce(eventsName: any, callback: any, context: any, ...listenerArgs: any[]): /*elided*/ any;
7
- dispatch(eventsName: any, ...args: any[]): /*elided*/ any;
8
- hasListener(eventName: any, callback: any, context: any): boolean;
9
- removeListener(eventName: any, callback: any, context: any): /*elided*/ any;
10
- getListeners(eventName: any): any;
11
- reset(): void;
12
- };
13
- Mouse: typeof Mouse;
14
3
  default: typeof i18n.default;
15
4
  equals: (o1: any, o2: any, seen?: WeakMap<WeakKey, any>) => any;
16
5
  noop: () => void;
@@ -175,5 +164,6 @@ import * as math from './math.js';
175
164
  import * as utils from './utils.js';
176
165
  import eventDispatcher from './eventDispatcher.js';
177
166
  import Mouse from './Mouse.js';
167
+ import Translator from './Translator.js';
178
168
  import * as i18n from './Translator.js';
179
- export { stringFunctions, arrayFunctions, traversal, is, random, getStyle, dom, math, utils, eventDispatcher, Mouse };
169
+ export { stringFunctions, arrayFunctions, traversal, is, random, getStyle, dom, math, utils, eventDispatcher, Mouse, Translator };
@@ -7,4 +7,4 @@ export function clone<T>(o: T): T;
7
7
  export function merge<T>(first: Collection<T>, second?: Collection<T>, ...args: Collection<T>[]): Array<T>;
8
8
  export type Collection<T> = Array<T> | Set<T> | Map<any, T> | {
9
9
  [x: string]: T;
10
- } | string;
10
+ } | string | string[];