@kizmann/pico-js 0.3.37 → 0.4.0

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,15 +1,16 @@
1
1
  {
2
2
  "name": "@kizmann/pico-js",
3
- "version": "0.3.37",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
+ "type": "module",
5
6
  "private": false,
6
7
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
7
8
  "repository": "https://github.com/vankizmann/pico-js",
8
9
  "main": "src/index.js",
9
10
  "unpkg": "dist/pico-js.js",
10
11
  "scripts": {
11
- "build": "webpack --hide-modules --mode=production",
12
- "watch": "webpack --watch --hide-modules --mode=development"
12
+ "build": "webpack --hide-modules --mode=production --config webpack.config.cjs",
13
+ "watch": "webpack --watch --hide-modules --mode=development --config webpack.config.cjs"
13
14
  },
14
15
  "devDependencies": {
15
16
  "@babel/core": "^7.4.5",
@@ -1,4 +1,4 @@
1
- import { Obj, UUID } from "../index";
1
+ import { Obj, UUID } from "../index.js";
2
2
 
3
3
  export default class DefaultElement
4
4
  {
@@ -1,5 +1,5 @@
1
- import { Dom } from "../index";
2
- import DefaultElement from "./default";
1
+ import { Dom } from "../index.js";
2
+ import DefaultElement from "./default.js";
3
3
 
4
4
  export default class Example extends DefaultElement
5
5
  {
package/src/index.js CHANGED
@@ -1,50 +1,50 @@
1
1
 
2
- import Arr from "./utility/array";
2
+ import Arr from "./utility/array.js";
3
3
  export { Arr };
4
4
 
5
- import Obj from "./utility/object";
5
+ import Obj from "./utility/object.js";
6
6
  export { Obj };
7
7
 
8
- import Num from "./utility/number";
8
+ import Num from "./utility/number.js";
9
9
  export { Num };
10
10
 
11
- import Str from "./utility/string";
11
+ import Str from "./utility/string.js";
12
12
  export { Str };
13
13
 
14
- import Now from "./utility/now";
14
+ import Now from "./utility/now.js";
15
15
  export { Now };
16
16
 
17
- import Any from "./utility/any";
17
+ import Any from "./utility/any.js";
18
18
  export { Any };
19
19
 
20
- import Dom from "./utility/dom";
20
+ import Dom from "./utility/dom.js";
21
21
  export { Dom };
22
22
 
23
- import Cookie from "./library/cookie";
23
+ import Cookie from "./library/cookie.js";
24
24
  export { Cookie };
25
25
 
26
- import Data from "./library/data";
26
+ import Data from "./library/data.js";
27
27
  export { Data };
28
28
 
29
- import Element from "./library/element";
29
+ import Element from "./library/element.js";
30
30
  export { Element };
31
31
 
32
- import Event from "./library/event";
32
+ import Event from "./library/event.js";
33
33
  export { Event };
34
34
 
35
- import Locale from "./library/locale";
35
+ import Locale from "./library/locale.js";
36
36
  export { Locale };
37
37
 
38
- import Map from "./library/map";
38
+ import Map from "./library/map.js";
39
39
  export { Map };
40
40
 
41
- import Queue from "./library/queue";
41
+ import Queue from "./library/queue.js";
42
42
  export { Queue };
43
43
 
44
- import Route from "./library/route";
44
+ import Route from "./library/route.js";
45
45
  export { Route };
46
46
 
47
- import { v4 as UUID } from 'uuid'
47
+ import { v4 as UUID } from "uuid"
48
48
  export { UUID };
49
49
 
50
50
  export const Pico = {
@@ -73,15 +73,15 @@ export const Pico = {
73
73
  * @const global
74
74
  */
75
75
 
76
- if ( typeof global.IE === 'undefined' ) {
76
+ if ( typeof global.IE === 'undefined' && global.navigator ) {
77
77
  global.IE = !! global.navigator.userAgent.match(/Edge\/|Trident\/|MSIE /);
78
78
  }
79
79
 
80
- if ( typeof global.WIN === 'undefined' ) {
80
+ if ( typeof global.WIN === 'undefined' && global.navigator ) {
81
81
  global.WIN = !! global.navigator.userAgent.match(/Windows/);
82
82
  }
83
83
 
84
- if ( typeof global.pi === 'undefined' ) {
84
+ if ( typeof global.pi === 'undefined' && global.navigator ) {
85
85
  global.pi = Pico;
86
86
  }
87
87
 
@@ -1,4 +1,4 @@
1
- import { Str, Arr, Obj, Num, Any, Event } from "../index";
1
+ import { Str, Arr, Obj, Num, Any, Event } from "../index.js";
2
2
 
3
3
  export class Cookie
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Arr, Obj, Num, Any, Event } from "../index";
1
+ import { Arr, Obj, Num, Any, Event } from "../index.js";
2
2
 
3
3
  export class Data
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Str, Obj, Dom, Any, Arr } from "../index";
1
+ import { Str, Obj, Dom, Any, Arr } from "../index.js";
2
2
 
3
3
  export class Element
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Arr, Any } from "../index";
1
+ import { Arr, Any } from "../index.js";
2
2
 
3
3
  export class Event
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Obj } from "../index";
1
+ import { Obj } from "../index.js";
2
2
 
3
3
  export class Locale
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Obj, Arr, Any, Dom, UUID } from "../index";
1
+ import { Obj, Arr, Any, Dom, UUID } from "../index.js";
2
2
 
3
3
  /**
4
4
  * @const {object} google
@@ -1,4 +1,4 @@
1
- import { Arr } from "../index";
1
+ import { Arr } from "../index.js";
2
2
 
3
3
  export default class Queue
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Obj, Str, Any } from "../index";
1
+ import { Obj, Str, Any } from "../index.js";
2
2
 
3
3
  export default class Route
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Arr, Obj, Now } from "../index";
1
+ import { Arr, Obj, Now } from "../index.js";
2
2
 
3
3
  export class Any
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Obj, Num, Any } from "../index"
1
+ import { Obj, Num, Any } from "../index.js"
2
2
 
3
3
  export class Arr
4
4
  {
@@ -1,8 +1,8 @@
1
- import Arr from './array';
2
- import Obj from './object';
3
- import Str from './string';
4
- import Num from './number';
5
- import Any from './any';
1
+ import Arr from './array.js';
2
+ import Obj from './object.js';
3
+ import Str from './string.js';
4
+ import Num from './number.js';
5
+ import Any from './any.js';
6
6
 
7
7
  export class Dom
8
8
  {
@@ -1,4 +1,4 @@
1
- import { Num, Arr, Any } from "../index";
1
+ import { Num, Arr, Any } from "../index.js";
2
2
  import moment from "moment";
3
3
 
4
4
  export class Now
@@ -1,4 +1,4 @@
1
- import { Any, Arr, Obj } from "../index"
1
+ import { Any, Arr, Obj } from "../index.js"
2
2
 
3
3
  export class Num
4
4
  {
@@ -1,5 +1,5 @@
1
- import Arr from "./array";
2
- import Any from "./any";
1
+ import Arr from "./array.js";
2
+ import Any from "./any.js";
3
3
 
4
4
  export class Obj
5
5
  {
@@ -1,7 +1,7 @@
1
- import Arr from "./array";
2
- import Obj from "./object";
3
- import Num from "./number";
4
- import Any from "./any";
1
+ import Arr from "./array.js";
2
+ import Obj from "./object.js";
3
+ import Num from "./number.js";
4
+ import Any from "./any.js";
5
5
 
6
6
  export class Str
7
7
  {
@@ -13,7 +13,7 @@ let config = {
13
13
  ],
14
14
  loader: 'babel-loader',
15
15
  options: {
16
- configFile: path.resolve('./babel.config.js')
16
+ configFile: path.resolve('./babel.config.cjs')
17
17
  },
18
18
  }
19
19
  ]
File without changes