目录

isEmptyObject()

功能

检查对象是否为空(不包含可枚举的属性)。

语法

langx.isEmptyObject(obj)

参数

范例

Example: 判断 isEmptyObject 是否为空对象,b 显示判断值。

<!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 empty object? <b></b>
    <script>
    require(["skylark/finder", "skylark/langx", "skylark/datax"], function(finder, langx, datax) {
        var isEmptyObject;
        datax.text(finder.find("b"), langx.isEmptyObject(isEmptyObject));
    });
    </script>
</body>

</html>