MCPcopy Index your code
hub / github.com/ygs-code/vue / getType

Function getType

vue.js:2507–2510  ·  view source on GitHub ↗

* Use function string name to check built-in types, * because a simple equality check will fail when running * across different vms / iframes. * 检查函数是否是函数声明 如果是函数表达式或者匿名函数是匹配不上的 * *

(fn)

Source from the content-addressed store, hash-verified

2505 *
2506 */
2507 function getType(fn) {
2508 var match = fn && fn.toString().match(/^\s*function (\w+)/);
2509 return match ? match[1] : ''
2510 }
2511
2512 //判断两个函数声明是否是相等
2513 function isSameType(a, b) {

Callers 3

getPropDefaultValueFunction · 0.85
assertTypeFunction · 0.85
isSameTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected