Skip to main content
Module

x/denops_std/function/mod.ts>reverse

📚 Standard module for denops.vim
Go to Latest
function reverse
import { reverse } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Reverse the order of items in {object}. {object} can be a List, a Blob or a String. For a List and a Blob the items are reversed in-place and {object} is returned. For a String a new String is returned. Returns zero if {object} is not a List, Blob or a String. If you want a List or Blob to remain unmodified make a copy first:

:let revlist = reverse(copy(mylist))

Can also be used as a method:

mylist->reverse()

Parameters

denops: Denops
object: unknown

Returns

Promise<unknown[] | unknown | string>