Home

constant: range


  {
    "comment": "/**\r\n * Creates an array of numbers (positive and/or negative) progressing from\r\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\r\n * `start` is specified without an `end` or `step`. If `end` is not specified,\r\n * it's set to `start` with `start` then set to `0`.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @since 0.1.0\r\n * @category Util\r\n * @param {number} [start=0] The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} [step=1] The value to increment or decrement by.\r\n * @returns {Array} Returns the range of numbers.\r\n * @see inRange, rangeRight\r\n * @example\r\n *\r\n * range(4)\r\n * // => [0, 1, 2, 3]\r\n *\r\n * range(-4)\r\n * // => [0, -1, -2, -3]\r\n *\r\n * range(1, 5)\r\n * // => [1, 2, 3, 4]\r\n *\r\n * range(0, 20, 5)\r\n * // => [0, 5, 10, 15]\r\n *\r\n * range(0, -4, -1)\r\n * // => [0, -1, -2, -3]\r\n *\r\n * range(1, 4, 0)\r\n * // => [1, 1, 1]\r\n *\r\n * range(0)\r\n * // => []\r\n */",
    "meta": {
        "range": [
            1103,
            1124
        ],
        "filename": "range.js",
        "lineno": 42,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
        "code": {
            "id": "astnode100007486",
            "name": "range",
            "type": "CallExpression",
            "value": ""
        }
    },
    "description": "Creates an array of numbers (positive and/or negative) progressing from\r`start` up to, but not including, `end`. A step of `-1` is used if a negative\r`start` is specified without an `end` or `step`. If `end` is not specified,\rit's set to `start` with `start` then set to `0`.\r\r**Note:** JavaScript follows the IEEE-754 standard for resolving\rfloating-point values which can produce unexpected results.",
    "since": "0.1.0",
    "tags": [
        {
            "originalTitle": "category",
            "title": "category",
            "text": "Util",
            "value": "Util"
        }
    ],
    "params": [
        {
            "type": {
                "names": [
                    "number"
                ]
            },
            "optional": true,
            "defaultvalue": 0,
            "description": "The start of the range.",
            "name": "start"
        },
        {
            "type": {
                "names": [
                    "number"
                ]
            },
            "description": "The end of the range.",
            "name": "end"
        },
        {
            "type": {
                "names": [
                    "number"
                ]
            },
            "optional": true,
            "defaultvalue": 1,
            "description": "The value to increment or decrement by.",
            "name": "step"
        }
    ],
    "returns": [
        {
            "type": {
                "names": [
                    "Array"
                ]
            },
            "description": "Returns the range of numbers."
        }
    ],
    "see": [
        "inRange, rangeRight"
    ],
    "examples": [
        "range(4)\r// => [0, 1, 2, 3]\r\rrange(-4)\r// => [0, -1, -2, -3]\r\rrange(1, 5)\r// => [1, 2, 3, 4]\r\rrange(0, 20, 5)\r// => [0, 5, 10, 15]\r\rrange(0, -4, -1)\r// => [0, -1, -2, -3]\r\rrange(1, 4, 0)\r// => [1, 1, 1]\r\rrange(0)\r// => []"
    ],
    "name": "range",
    "longname": "range",
    "kind": "constant",
    "scope": "global",
    "___id": "T000002R000684",
    "___s": true,
    "filepath": "range.js"
}