a-js-tools 0.5.3 → 0.5.4-beta.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/cjs/src/isNode.cjs +1 -3
- package/mjs/src/isNode.mjs +1 -3
- package/package.json +1 -1
package/cjs/src/isNode.cjs
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var aTypeOfJs = require('a-type-of-js');
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
*
|
|
7
5
|
* 判断当前环境是否为 node 环境
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
function isNode() {
|
|
11
|
-
return
|
|
9
|
+
return (typeof window === 'undefined' || typeof window.document === 'undefined');
|
|
12
10
|
}
|
|
13
11
|
/**
|
|
14
12
|
*
|
package/mjs/src/isNode.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { isUndefined } from 'a-type-of-js';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
*
|
|
5
3
|
* 判断当前环境是否为 node 环境
|
|
6
4
|
*
|
|
7
5
|
*/
|
|
8
6
|
function isNode() {
|
|
9
|
-
return
|
|
7
|
+
return (typeof window === 'undefined' || typeof window.document === 'undefined');
|
|
10
8
|
}
|
|
11
9
|
/**
|
|
12
10
|
*
|