New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

power-set-x

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

power-set-x

Calculates the Power Set of a set S.

latest
Source
npmnpm
Version
2.1.2
Version published
Weekly downloads
2
-92%
Maintainers
1
Weekly downloads
 
Created
Source

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

power-set-x

Calculates the Power Set of a set S.

module.exports(value)Array.<Array>

This method calculates the Power Set of value. Array sparseness is ignored.

In mathematics, the power set (or powerset) of any set S, written P(S), ℘(S), P(S), ℙ(S) or 2S, is the set of all subsets of S, including the empty set and S itself.

Kind: Exported function
Returns: Array.<Array> - The power set of value.
See: http://en.wikipedia.org/wiki/Power_set

ParamTypeDescription
valueArrayThe array like value to get the power set of.

Example

import powerSet from 'power-set-x';

console.log(powerSet([1, 2, 3])); // [[], [3], [2], [2, 3], [1], [1, 3], [1, 2], [1, 2, 3]]

Keywords

powerSet

FAQs

Package last updated on 28 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts