import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { empty } = fn;
Return the Number 1 if {expr} is empty, zero otherwise.
- A
List
orDictionary
is empty when it does not have any items. - A
String
is empty when its length is zero. - A
Number
andFloat
are empty when their value is zero. v:false
,v:none
andv:null
are empty,v:true
is not.- A
Job
is empty when it failed to start. - A
Channel
is empty when it is closed. - A
Blob
is empty when its length is zero.
For a long List
this is much faster than comparing the
length with zero.
Can also be used as a method
:
mylist->empty()
Parameters
denops: Denops