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

extra-lists

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extra-lists - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

12

index.d.ts

@@ -194,9 +194,9 @@ declare module 'extra-lists' {

/**
* Checks if lists has a submap.
* Checks if lists has a subset.
* @param x lists
* @param y submap?
* @param y subset?
* @param fc compare function (a, b)
* @param fm map function (v, k, x)
*/
export function isSubmap<T, U, V = U>(x: Lists<T, U>, y: Lists<T, U>, fc?: compareFn<U | V>, fm?: mapFn<T, U, U | V>): boolean;
export function isSubset<T, U, V = U>(x: Lists<T, U>, y: Lists<T, U>, fc?: compareFn<U | V>, fm?: mapFn<T, U, U | V>): boolean;
/**

@@ -371,9 +371,9 @@ * Checks if lists has a value.

*/
export function submap<T, U>(x: Lists<T, U>, n?: number, r?: number): Lists<T, U>;
export function subset<T, U>(x: Lists<T, U>, n?: number, r?: number): Lists<T, U>;
/**
* Lists all possible submaps.
* Lists all possible subsets.
* @param x lists
* @param n number of entries (-1 => any)
*/
export function submaps<T, U>(x: Lists<T, U>, n?: number): Iterable<Lists<T, U>>;
export function subsets<T, U>(x: Lists<T, U>, n?: number): Iterable<Lists<T, U>>;
/**

@@ -380,0 +380,0 @@ * Exchanges two values.

@@ -260,3 +260,3 @@ 'use strict';

function isSubmap(x, y, fc = null, fm = null) {
function isSubset(x, y, fc = null, fm = null) {
var fc = fc || cmp, fm = fm || id$1;

@@ -359,3 +359,3 @@ for (var [k, v] of y) {

function submap(x, n = -1, r = Math.random()) {
function subset(x, n = -1, r = Math.random()) {
var ks = subsequence([...x.keys()], n, r);

@@ -365,3 +365,3 @@ return filterAt(x, ks);

function* submaps(x, n = -1) {
function* subsets(x, n = -1) {
for (var ks of subsequences([...x.keys()], n))

@@ -843,4 +843,4 @@ yield filterAt(x, ks);

function isSubmap$1(x, y, fc = null, fm = null) {
return isSubmap(new Map(entries(x)), entries(y), fc, fm);
function isSubset$1(x, y, fc = null, fm = null) {
return isSubset(new Map(entries(x)), entries(y), fc, fm);
}

@@ -993,9 +993,9 @@

function submap$1(x, n = -1, r = Math.random()) {
var a = submap(new Map(entries(x)), n, r);
function subset$1(x, n = -1, r = Math.random()) {
var a = subset(new Map(entries(x)), n, r);
return [a.keys(), a.values()];
}
function* submaps$1(x, n = -1) {
for (var a of submaps(new Map(entries(x)), n))
function* subsets$1(x, n = -1) {
for (var a of subsets(new Map(entries(x)), n))
yield [a.keys(), a.values()];

@@ -1071,3 +1071,3 @@ }

exports.isKey = isKey;
exports.isSubmap = isSubmap$1;
exports.isSubset = isSubset$1;
exports.isValue = isValue$1;

@@ -1098,4 +1098,4 @@ exports.join = join$1;

exports.some = some$3;
exports.submap = submap$1;
exports.submaps = submaps$1;
exports.subset = subset$1;
exports.subsets = subsets$1;
exports.swap = swap;

@@ -1102,0 +1102,0 @@ exports.symmetricDifference = symmetricDifference$1;

{
"name": "extra-lists",
"version": "2.1.0",
"version": "2.1.1",
"description": "Lists is a pair of key list and value list, with unique keys.",

@@ -100,9 +100,9 @@ "main": "index.js",

"devDependencies": {
"extra-array": "^2.9.9",
"extra-array": "^2.9.12",
"extra-build": "^1.0.187",
"extra-entries": "^2.1.14",
"extra-entries": "^2.1.16",
"extra-iterable": "^2.4.29",
"extra-map": "^2.1.30",
"extra-set": "^2.1.56"
"extra-map": "^2.1.32",
"extra-set": "^2.1.60"
}
}

Sorry, the diff of this file is not supported yet

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