Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>or

๐Ÿ“š Standard module for denops.vim
Go to Latest
function or
import { or } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

Bitwise OR on the two arguments. The arguments are converted to a number. A List, Dict or Float argument causes an error. Also see and() and xor(). Example:

:let bits = or(bits, 0x80)

Can also be used as a method:

:let bits = bits->or(0x80)

Rationale: The reason this is a function and not using the "|" character like many languages, is that Vi has always used "|" to separate commands. In many places it would not be clear if "|" is an operator or a command separator.

Parameters

denops: Denops
expr1: unknown
expr2: unknown

Returns

Promise<number>