File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ import Vue from 'vue' ;
2
+
1
3
export function isString ( obj ) {
2
4
return Object . prototype . toString . call ( obj ) === '[object String]' ;
3
5
}
@@ -10,11 +12,25 @@ export function isHtmlElement(node) {
10
12
return node && node . nodeType === Node . ELEMENT_NODE ;
11
13
}
12
14
13
- export const isFunction = ( functionToCheck ) => {
15
+ /**
16
+ * - Inspired:
17
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
18
+ */
19
+ let isFunction = ( functionToCheck ) => {
14
20
var getType = { } ;
15
21
return functionToCheck && getType . toString . call ( functionToCheck ) === '[object Function]' ;
16
22
} ;
17
23
24
+ if ( typeof / ./ !== 'function' && typeof Int8Array !== 'object' && ( Vue . prototype . $isServer || typeof document . childNodes !== 'function' ) ) {
25
+ isFunction = function ( obj ) {
26
+ return typeof obj === 'function' || false ;
27
+ } ;
28
+ }
29
+
30
+ export {
31
+ isFunction
32
+ } ;
33
+
18
34
export const isUndefined = ( val ) => {
19
35
return val === void 0 ;
20
36
} ;
You can’t perform that action at this time.
0 commit comments