Skip to main content
Module

x/denops_std/function/nvim/mod.ts>id

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

Returns a String which is a unique identifier of the container type (List, Dict, Blob and Partial). It is guaranteed that for the mentioned types id(v1) ==# id(v2) returns true iff type(v1) == type(v2) && v1 is v2. Note that v:_null_string, v:_null_list, v:_null_dict and v:_null_blob have the same id() with different types because they are internally represented as NULL pointers. id() returns a hexadecimal representanion of the pointers to the containers (i.e. like 0x994a40), same as printf("%p", {expr}), but it is advised against counting on the exact format of the return value.

It is not guaranteed that id(no_longer_existing_container) will not be equal to some other id(): new containers may reuse identifiers of the garbage-collected ones.

Parameters

denops: Denops
expr: unknown

Returns

Promise<string>