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 4.0.0 to 5.0.0

56

lib.js

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

import { _a1__wrap } from '@ctx-core/function'
/**

@@ -6,13 +7,14 @@ * @module @ctx-core/set/lib.js

* Returns a `set` with the _union of the members
* @param [...array] members
* @param {*|Array<Array>} nowrap__a2__member
* @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__)
export function _union(nowrap__a2__member) {
const a1__nowrap__a1__member = _a1__wrap(nowrap__a2__member)
let a1__member__set = []
for (let i = 0; i < a1__nowrap__a1__member.length; i++) {
const a1__member = _a1__wrap(a1__nowrap__a1__member[i])
a1__member__set.push(...a1__member)
}
return new Set(members)
return new Set(a1__member__set)
}

@@ -22,15 +24,17 @@ export const _union__set = _union

* Returns a `set` with the _intersection of the members
* @param [...*] member
* @param {*|Array<Array>} __a2__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)
export function _intersection(__a2__member) {
const a1__nowrap__a1__member = _a1__wrap(__a2__member)
const [__a1__root, ...a1__nowrap__a1__rest] = a1__nowrap__a1__member
const set__rest = _union(a1__nowrap__a1__rest)
const a1__root = _a1__wrap(__a1__root)
let a1__member__set = []
for (let i = 0; i < a1__root.length; i++) {
const root = a1__root[i]
if (set__rest.has(root)) a1__member__set.push(root)
}
return new Set(members)
return new Set(a1__member__set)
}

@@ -40,16 +44,18 @@ 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.
* @param {*|Array<Array>} __a2__member - 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)
export function _difference(__a2__member) {
const a1__nowrap__a1__member = _a1__wrap(__a2__member)
const [__a1__root, ...a1__nowrap__a1__rest] = a1__nowrap__a1__member
const set__rest = _union(a1__nowrap__a1__rest)
const a1__root = _a1__wrap(__a1__root)
let a1__member__set = []
for (let i = 0; i < a1__root.length; i++) {
const x = a1__root[i]
if (!set__rest.has(x)) a1__member__set.push(x)
}
return new Set(members)
return new Set(a1__member__set)
}
export const _difference__set = _difference
{
"name": "@ctx-core/set",
"version": "4.0.0",
"version": "5.0.0",
"description": "ctx-core set",

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

"homepage": "https://github.com/ctx-core/ctx-core#readme",
"gitHead": "7d0d73495e67101da1ad8aeb87a7b9918b4689c1"
"gitHead": "6e0a03a3dbbf6b2d1aaadf94fe6250e537ae3457"
}
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