File Explorer

/var/runtime/node_modules/@aws-sdk/node_modules/obliterator

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

0 dirs
33 files
power-set.js614 B · 29 lines
/** * Obliterator Power Set Function * =============================== * * Iterator returning the power set of the given array. */var Iterator = require('./iterator.js'),    combinations = require('./combinations.js'),    chain = require('./chain.js'); /** * Power set. * * @param  {array}    array - Target array. * @return {Iterator} */module.exports = function powerSet(array) {  var n = array.length;   var iterators = new Array(n + 1);   iterators[0] = Iterator.of([]);   for (var i = 1; i < n + 1; i++)    iterators[i] = combinations(array, i);   return chain.apply(null, iterators);};