目录

uniq()

功能

删除数组中重复值。

语法

langx.uniq(array)

参数

范例

Example: 过滤[1,2,2,3,3,4,4,5]数组重覆字符串,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 [1,2,2,3,3,4,4,5] an Array  <span>uniq </span>
    <input></input>
    <script>
    require(["skylark/finder", "skylark/langx", "skylark/datax"], function(finder, langx, datax) {
        var text = langx.uniq("1,2,2,3,3,4,4,5");
        datax.val(finder.find("input"),text)
    });
    </script>
</body>

</html>