Skip to main content
Module

x/ddc_vim/deps.ts>fn.range

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.range
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { range } = fn;

Returns a |List| with Numbers:

  • If only {expr} is specified: [0, 1, ..., {expr} - 1]
  • If {max} is specified: [{expr}, {expr} + 1, ..., {max}]
  • If {stride} is specified: [{expr}, {expr} + {stride}, ..., {max}] (increasing {expr} with {stride} each time, not producing a value past {max}). When the maximum is one before the start the result is an empty list. When the maximum is more than one before the start this is an error. Examples: range(4) " [0, 1, 2, 3] range(2, 4) " [2, 3, 4] range(2, 9, 3) " [2, 5, 8] range(2, -2, -1) " [2, 1, 0, -1, -2] range(0) " [] range(2, 0) " error! Can also be used as a |method|: GetExpr()->range()

Parameters

denops: Denops
expr: unknown
optional
max: unknown
optional
stride: unknown

Returns

Promise<unknown>