UNPKG

hodash.flatten-to-set

Version:

Flattens an Array/Set. All children which implement .forEach will be flattened into output, alongside non-iterables.

6 lines (3 loc) 160 B
const _flattenToSet = require('../'); const data = [{name: 'Tomas'}, 43, 'hi', ['hello', 12], new Set(['I', 'am', 'set'])]; console.log(_flattenToSet(data));