Home

function: sortedUniq


sortedUniq(array: Array): Array

This method is like `uniq` except that it's designed and optimized for sorted arrays.

Example(s):

sortedUniq([1, 1, 2])
// => [1, 2]

Params:

Name Type Attribute Description
array The array to inspect.

Returns:

Array

  {
    "comment": "/**\r\n * This method is like `uniq` except that it's designed and optimized\r\n * for sorted arrays.\r\n *\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * sortedUniq([1, 1, 2])\r\n * // => [1, 2]\r\n */",
    "meta": {
        "range": [
            373,
            485
        ],
        "filename": "sortedUniq.js",
        "lineno": 16,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
        "code": {
            "id": "astnode100008609",
            "name": "sortedUniq",
            "type": "FunctionDeclaration",
            "paramnames": [
                "array"
            ]
        }
    },
    "description": "This method is like `uniq` except that it's designed and optimized\rfor sorted arrays.",
    "since": "4.0.0",
    "tags": [
        {
            "originalTitle": "category",
            "title": "category",
            "text": "Array",
            "value": "Array"
        }
    ],
    "params": [
        {
            "type": {
                "names": [
                    "Array"
                ]
            },
            "description": "The array to inspect.",
            "name": "array"
        }
    ],
    "returns": [
        {
            "type": {
                "names": [
                    "Array"
                ]
            },
            "description": "Returns the new duplicate free array."
        }
    ],
    "examples": [
        "sortedUniq([1, 1, 2])\r// => [1, 2]"
    ],
    "name": "sortedUniq",
    "longname": "sortedUniq",
    "kind": "function",
    "scope": "global",
    "___id": "T000002R000788",
    "___s": true,
    "filepath": "sortedUniq.js"
}