@kizmann/pico-js 0.4.0 → 0.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/pico-js",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -16,7 +16,7 @@ export default class Example extends DefaultElement
16
16
 
17
17
  bind()
18
18
  {
19
- if ( window.$ === undefined ) {
19
+ if ( global.$ === undefined ) {
20
20
  return console.error('Element ready function requires jquery.')
21
21
  }
22
22
 
@@ -2,7 +2,7 @@ import { Arr, Obj, Num, Any, Event } from "../index.js";
2
2
 
3
3
  export class Data
4
4
  {
5
- static data = Obj.get(window, '_data', {});
5
+ static data = Obj.get(global, '_data', {});
6
6
 
7
7
  static has(input)
8
8
  {
@@ -5,7 +5,7 @@ export class Locale
5
5
  /**
6
6
  * Get locales from window if present.
7
7
  */
8
- static locales = Obj.get(window, '_locales', {});
8
+ static locales = Obj.get(global, '_locales', {});
9
9
 
10
10
  static pickByCount(splits, count)
11
11
  {
@@ -2,7 +2,7 @@ import { Obj, Str, Any } from "../index.js";
2
2
 
3
3
  export default class Route
4
4
  {
5
- static routes = Obj.get(window, '_routes', {});
5
+ static routes = Obj.get(global, '_routes', {});
6
6
 
7
7
  static set (key, value)
8
8
  {
@@ -22,7 +22,7 @@ export default class Route
22
22
 
23
23
  static goto (key, values = null, params = null)
24
24
  {
25
- window.location.href = this.get(key, values, params);
25
+ global.location.href = this.get(key, values, params);
26
26
  }
27
27
 
28
28
  }
@@ -110,8 +110,8 @@ export class Dom
110
110
 
111
111
  static title(text = null, glue = ' - ')
112
112
  {
113
- document.title = window.baseTitle !== undefined ?
114
- text + glue + window.baseTitle : text;
113
+ document.title = global.baseTitle !== undefined ?
114
+ text + glue + global.baseTitle : text;
115
115
 
116
116
  return this;
117
117
  }