Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ctx-core/set

Package Overview
Dependencies
Maintainers
1
Versions
491
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ctx-core/set - npm Package Compare versions

Comparing version 3.0.2 to 4.0.0

54

lib.js

@@ -1,2 +0,52 @@

require = require('esm')(module)
module.exports = require('./lib.mjs')
/**
* @module @ctx-core/set/lib.js
*/
/**
* Returns a `set` with the _union of the members
* @param [...array] members
* @returns {Set} The _union of the members
* @see {@link http://www.2ality.com/2015/01/es6-set-operations.html}
*/
export function _union(...ARR__members) {
let members = []
for (let i = 0; i < ARR__members.length; i++) {
const members__ = ARR__members[i]
members.push(...members__)
}
return new Set(members)
}
export const _union__set = _union
/**
* Returns a `set` with the _intersection of the members
* @param [...*] member
* @returns {Set} The _intersection of the members
* @see {@link http://www.2ality.com/2015/01/es6-set-operations.html}
*/
export function _intersection(root_set, ...rest) {
const set__rest = _union(...rest)
const ARR__filter = [...root_set]
let members = []
for (let i = 0; i < ARR__filter.length; i++) {
const x = ARR__filter[i]
if (set__rest.has(x)) members.push(x)
}
return new Set(members)
}
export const _intersection__set = _intersection
/**
* Returns a new set with a _difference of the array-like arguments.
* @param [...array] array - An array-like to perform the _difference operation on.
* @returns {Set} The _difference of the array-like arguments.
* @see {@link http://www.2ality.com/2015/01/es6-set-operations.html}
*/
export function _difference(root_set, ...rest) {
const set__rest = _union(...rest)
const ARR__filter = [...root_set]
let members = []
for (let i = 0; i < ARR__filter.length; i++) {
const x = ARR__filter[i]
if (!set__rest.has(x)) members.push(x)
}
return new Set(members)
}
export const _difference__set = _difference

7

package.json
{
"name": "@ctx-core/set",
"version": "3.0.2",
"version": "4.0.0",
"description": "ctx-core set",

@@ -23,6 +23,3 @@ "main": "lib.js",

"homepage": "https://github.com/ctx-core/ctx-core#readme",
"dependencies": {
"esm": "^3.0.84"
},
"gitHead": "edc7fb28a958f01f067ddc1dd18944cd613112d2"
"gitHead": "7d0d73495e67101da1ad8aeb87a7b9918b4689c1"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc