Skip to content

eles.nonempty()

eles.nonempty — Collection > Iteration and aggregation. Cytoscape.js signatures, parameters and return contract.

eles.nonempty — Collection › Iteration and aggregation

Preview · Collection › Iteration and aggregation

Read in the complete API reference · All API members

// Whether the collection holds at least one element
eles.nonempty(): boolean

Whether the collection holds at least one element.

Returns boolean

true when non-empty

Example

console.log(eles.nonempty()); // true

Example graph and handle setup