Skip to content

Types Methods

Science Spot edited this page Oct 19, 2020 · 1 revision

Types Methods

const { sizeType } = require('node-set-theory');

// Will return 'empty', 'singleton' or 'many' based on the size of the set...
sizeType([]); // Will return 'empty' which means null set
sizeType([1]); // Will return 'singleton' which means it has only 1 element
sizeType([1, 2, 3]); // Will return 'many' which means it has more than 1 element
Clone this wiki locally