目录

isFunction()

功能

检查是否为函数。

语法

langx.isFunction(value)

参数

范例

Example: 判断传入的参数是否为函数,input 显示判断值。

<!DOCTYPE html>
<html>

<head>
    <style>
    </style>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script>
    <script>
    require.config({
        baseUrl: "./",
        packages: [{
            name: "skylark",
            location: "../../../src/skylark"
        }, ]
    });
    </script>
</head>

<body>
   Is 'function(){}' a function?<b></b>
    <input></input>
    <script>
    require(["skylark/finder", "skylark/langx", "skylark/datax"], function(finder, langx, datax) {
        var text = langx.isFunction(function(){});
        datax.val(finder.find("input"),text)
    });
    </script>
</body>

</html>