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

@eturino/key-set

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eturino/key-set - npm Package Compare versions

Comparing version 4.5.1 to 4.7.0

build/main/lib/key-set/composed.d.ts

3

build/main/lib/key-set.d.ts

@@ -11,2 +11,3 @@ import { isKeySet, isKeySetAll, isKeySetAllExceptSome, isKeySetNone, isKeySetSome, isValidKey, Key, KeyLabelSet, KeyLabelSetAllExceptSomeSerialized, KeyLabelSetAllSerialized, KeyLabelSetNoneSerialized, KeyLabelSetSerialized, KeyLabelSetSomeSerialized, KeySet, KeySetAllExceptSomeSerialized, KeySetAllSerialized, KeySetNoneSerialized, KeySetSerialized, KeySetSomeSerialized, KeySetTypes, KeySetTypesEnumValues } from "./key-set/-base";

import { KeySetSome, some, someForced } from "./key-set/some";
import { ComposedKeySet, ComposedKeyLabelSet, composedKeySetFrom } from "./key-set/composed";
import { EmptyArray, isEmptyArray, isNonEmptyArray, NonEmptyArray } from "./util/array-types";

@@ -16,2 +17,2 @@ import { arraysEqual } from "./util/arrays-equal";

import { uniqueArray, uniqueKeyLabelArray } from "./util/unique-array";
export { all, allExceptSome, allExceptSomeForced, none, some, someForced, Key, KeySet, KeyLabelSet, KeySetAll, KeySetAllExceptSome, KeySetNone, KeySetSome, KeySetSerialized, KeySetAllExceptSomeSerialized, KeySetAllSerialized, KeySetNoneSerialized, KeySetSomeSerialized, KeyLabelSetAllSerialized, KeyLabelSetNoneSerialized, KeyLabelSetSomeSerialized, KeyLabelSetAllExceptSomeSerialized, KeyLabelSetSerialized, IKeyLabel, InvalidKeySetError, InvalidEmptySetError, KeySetTypes, KeySetTypesEnumValues, serializeKeySet, parseKeySet, uniqueArray, uniqueKeyLabelArray, arraysEqual, EmptyArray, NonEmptyArray, isEmptyArray, isNonEmptyArray, isKeySet, isKeySetAll, isKeySetNone, isKeySetSome, isKeySetAllExceptSome, isKeySetSerialized, isKeySetAllSerialized, isKeySetNoneSerialized, isKeySetSomeSerialized, isKeySetAllExceptSomeSerialized, isValidKey, isKeyLabel, isObject, isKeySetOfStrings, isKeySetOfNumbers, isKeySetOfStringKeyLabels, isKeySetOfNumberKeyLabels, isKeySetSerializedOfNumberKeyLabels, isKeySetSerializedOfNumbers, isKeySetSerializedOfStringKeyLabels, isKeySetSerializedOfStrings, };
export { all, allExceptSome, allExceptSomeForced, none, some, someForced, composedKeySetFrom, ComposedKeySet, ComposedKeyLabelSet, Key, KeySet, KeyLabelSet, KeySetAll, KeySetAllExceptSome, KeySetNone, KeySetSome, KeySetSerialized, KeySetAllExceptSomeSerialized, KeySetAllSerialized, KeySetNoneSerialized, KeySetSomeSerialized, KeyLabelSetAllSerialized, KeyLabelSetNoneSerialized, KeyLabelSetSomeSerialized, KeyLabelSetAllExceptSomeSerialized, KeyLabelSetSerialized, IKeyLabel, InvalidKeySetError, InvalidEmptySetError, KeySetTypes, KeySetTypesEnumValues, serializeKeySet, parseKeySet, uniqueArray, uniqueKeyLabelArray, arraysEqual, EmptyArray, NonEmptyArray, isEmptyArray, isNonEmptyArray, isKeySet, isKeySetAll, isKeySetNone, isKeySetSome, isKeySetAllExceptSome, isKeySetSerialized, isKeySetAllSerialized, isKeySetNoneSerialized, isKeySetSomeSerialized, isKeySetAllExceptSomeSerialized, isValidKey, isKeyLabel, isObject, isKeySetOfStrings, isKeySetOfNumbers, isKeySetOfStringKeyLabels, isKeySetOfNumberKeyLabels, isKeySetSerializedOfNumberKeyLabels, isKeySetSerializedOfNumbers, isKeySetSerializedOfStringKeyLabels, isKeySetSerializedOfStrings, };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isKeySetSerializedOfStrings = exports.isKeySetSerializedOfStringKeyLabels = exports.isKeySetSerializedOfNumbers = exports.isKeySetSerializedOfNumberKeyLabels = exports.isKeySetOfNumberKeyLabels = exports.isKeySetOfStringKeyLabels = exports.isKeySetOfNumbers = exports.isKeySetOfStrings = exports.isObject = exports.isKeyLabel = exports.isValidKey = exports.isKeySetAllExceptSomeSerialized = exports.isKeySetSomeSerialized = exports.isKeySetNoneSerialized = exports.isKeySetAllSerialized = exports.isKeySetSerialized = exports.isKeySetAllExceptSome = exports.isKeySetSome = exports.isKeySetNone = exports.isKeySetAll = exports.isKeySet = exports.isNonEmptyArray = exports.isEmptyArray = exports.arraysEqual = exports.uniqueKeyLabelArray = exports.uniqueArray = exports.parseKeySet = exports.serializeKeySet = exports.KeySetTypes = exports.InvalidEmptySetError = exports.InvalidKeySetError = exports.KeySetSome = exports.KeySetNone = exports.KeySetAllExceptSome = exports.KeySetAll = exports.someForced = exports.some = exports.none = exports.allExceptSomeForced = exports.allExceptSome = exports.all = void 0;
exports.isKeySetSerializedOfStrings = exports.isKeySetSerializedOfStringKeyLabels = exports.isKeySetSerializedOfNumbers = exports.isKeySetSerializedOfNumberKeyLabels = exports.isKeySetOfNumberKeyLabels = exports.isKeySetOfStringKeyLabels = exports.isKeySetOfNumbers = exports.isKeySetOfStrings = exports.isObject = exports.isKeyLabel = exports.isValidKey = exports.isKeySetAllExceptSomeSerialized = exports.isKeySetSomeSerialized = exports.isKeySetNoneSerialized = exports.isKeySetAllSerialized = exports.isKeySetSerialized = exports.isKeySetAllExceptSome = exports.isKeySetSome = exports.isKeySetNone = exports.isKeySetAll = exports.isKeySet = exports.isNonEmptyArray = exports.isEmptyArray = exports.arraysEqual = exports.uniqueKeyLabelArray = exports.uniqueArray = exports.parseKeySet = exports.serializeKeySet = exports.KeySetTypes = exports.InvalidEmptySetError = exports.InvalidKeySetError = exports.KeySetSome = exports.KeySetNone = exports.KeySetAllExceptSome = exports.KeySetAll = exports.ComposedKeySet = exports.composedKeySetFrom = exports.someForced = exports.some = exports.none = exports.allExceptSomeForced = exports.allExceptSome = exports.all = void 0;
const _base_1 = require("./key-set/-base");

@@ -48,2 +48,5 @@ Object.defineProperty(exports, "isKeySet", { enumerable: true, get: function () { return _base_1.isKeySet; } });

Object.defineProperty(exports, "someForced", { enumerable: true, get: function () { return some_1.someForced; } });
const composed_1 = require("./key-set/composed");
Object.defineProperty(exports, "ComposedKeySet", { enumerable: true, get: function () { return composed_1.ComposedKeySet; } });
Object.defineProperty(exports, "composedKeySetFrom", { enumerable: true, get: function () { return composed_1.composedKeySetFrom; } });
const array_types_1 = require("./util/array-types");

@@ -60,2 +63,2 @@ Object.defineProperty(exports, "isEmptyArray", { enumerable: true, get: function () { return array_types_1.isEmptyArray; } });

Object.defineProperty(exports, "uniqueKeyLabelArray", { enumerable: true, get: function () { return unique_array_1.uniqueKeyLabelArray; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5LXNldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIva2V5LXNldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwyQ0FzQnlCO0FBOEV2Qix5RkFuR0EsZ0JBQVEsT0FtR0E7QUFDUiw0RkFuR0EsbUJBQVcsT0FtR0E7QUFHWCxzR0FyR0EsNkJBQXFCLE9BcUdBO0FBRnJCLDZGQWxHQSxvQkFBWSxPQWtHQTtBQUNaLDZGQWxHQSxvQkFBWSxPQWtHQTtBQVFaLDJGQXpHQSxrQkFBVSxPQXlHQTtBQTFCViw0RkFqRUEsbUJBQVcsT0FpRUE7QUE5RGIsdUNBQStDO0FBa0M3QyxvRkFsQ08sU0FBRyxPQWtDUDtBQVVILDBGQTVDWSxlQUFTLE9BNENaO0FBM0NYLCtEQUFvRztBQWtDbEcsOEZBbENPLCtCQUFhLE9Ba0NQO0FBQ2Isb0dBbkNzQixxQ0FBbUIsT0FtQ3RCO0FBU25CLG9HQTVDMkMscUNBQW1CLE9BNEMzQztBQTNDckIscUVBS3NDO0FBd0ZwQywwR0E1RkEsOENBQXlCLE9BNEZBO0FBRnpCLGt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, isKeySetSome, isValidKey, Key, KeyLabelSet, KeyLabelSetAllExceptSomeSerialized, KeyLabelSetAllSerialized, KeyLabelSetNoneSerialized, KeyLabelSetSerialized, KeyLabelSetSomeSerialized, KeySet, KeySetAllExceptSomeSerialized, KeySetAllSerialized, KeySetNoneSerialized, KeySetSerialized, KeySetSomeSerialized, KeySetTypes, KeySetTypesEnumValues } from "./key-set/-base";

import { KeySetSome, some, someForced } from "./key-set/some";
import { ComposedKeySet, ComposedKeyLabelSet, composedKeySetFrom } from "./key-set/composed";
import { EmptyArray, isEmptyArray, isNonEmptyArray, NonEmptyArray } from "./util/array-types";

@@ -16,2 +17,2 @@ import { arraysEqual } from "./util/arrays-equal";

import { uniqueArray, uniqueKeyLabelArray } from "./util/unique-array";
export { all, allExceptSome, allExceptSomeForced, none, some, someForced, Key, KeySet, KeyLabelSet, KeySetAll, KeySetAllExceptSome, KeySetNone, KeySetSome, KeySetSerialized, KeySetAllExceptSomeSerialized, KeySetAllSerialized, KeySetNoneSerialized, KeySetSomeSerialized, KeyLabelSetAllSerialized, KeyLabelSetNoneSerialized, KeyLabelSetSomeSerialized, KeyLabelSetAllExceptSomeSerialized, KeyLabelSetSerialized, IKeyLabel, InvalidKeySetError, InvalidEmptySetError, KeySetTypes, KeySetTypesEnumValues, serializeKeySet, parseKeySet, uniqueArray, uniqueKeyLabelArray, arraysEqual, EmptyArray, NonEmptyArray, isEmptyArray, isNonEmptyArray, isKeySet, isKeySetAll, isKeySetNone, isKeySetSome, isKeySetAllExceptSome, isKeySetSerialized, isKeySetAllSerialized, isKeySetNoneSerialized, isKeySetSomeSerialized, isKeySetAllExceptSomeSerialized, isValidKey, isKeyLabel, isObject, isKeySetOfStrings, isKeySetOfNumbers, isKeySetOfStringKeyLabels, isKeySetOfNumberKeyLabels, isKeySetSerializedOfNumberKeyLabels, isKeySetSerializedOfNumbers, isKeySetSerializedOfStringKeyLabels, isKeySetSerializedOfStrings, };
export { all, allExceptSome, allExceptSomeForced, none, some, someForced, composedKeySetFrom, ComposedKeySet, ComposedKeyLabelSet, Key, KeySet, KeyLabelSet, KeySetAll, KeySetAllExceptSome, KeySetNone, KeySetSome, KeySetSerialized, KeySetAllExceptSomeSerialized, KeySetAllSerialized, KeySetNoneSerialized, KeySetSomeSerialized, KeyLabelSetAllSerialized, KeyLabelSetNoneSerialized, KeyLabelSetSomeSerialized, KeyLabelSetAllExceptSomeSerialized, KeyLabelSetSerialized, IKeyLabel, InvalidKeySetError, InvalidEmptySetError, KeySetTypes, KeySetTypesEnumValues, serializeKeySet, parseKeySet, uniqueArray, uniqueKeyLabelArray, arraysEqual, EmptyArray, NonEmptyArray, isEmptyArray, isNonEmptyArray, isKeySet, isKeySetAll, isKeySetNone, isKeySetSome, isKeySetAllExceptSome, isKeySetSerialized, isKeySetAllSerialized, isKeySetNoneSerialized, isKeySetSomeSerialized, isKeySetAllExceptSomeSerialized, isValidKey, isKeyLabel, isObject, isKeySetOfStrings, isKeySetOfNumbers, isKeySetOfStringKeyLabels, isKeySetOfNumberKeyLabels, isKeySetSerializedOfNumberKeyLabels, isKeySetSerializedOfNumbers, isKeySetSerializedOfStringKeyLabels, isKeySetSerializedOfStrings, };

@@ -11,2 +11,3 @@ import { isKeySet, isKeySetAll, isKeySetAllExceptSome, isKeySetNone, isKeySetSome, isValidKey, KeySetTypes, } from "./key-set/-base";

import { KeySetSome, some, someForced } from "./key-set/some";
import { ComposedKeySet, composedKeySetFrom } from "./key-set/composed";
import { isEmptyArray, isNonEmptyArray } from "./util/array-types";

@@ -18,3 +19,7 @@ import { arraysEqual } from "./util/arrays-equal";

// builders
all, allExceptSome, allExceptSomeForced, none, some, someForced, KeySetAll, KeySetAllExceptSome, KeySetNone, KeySetSome, InvalidKeySetError, InvalidEmptySetError,
all, allExceptSome, allExceptSomeForced, none, some, someForced,
// composed
composedKeySetFrom,
// types and classes
ComposedKeySet, KeySetAll, KeySetAllExceptSome, KeySetNone, KeySetSome, InvalidKeySetError, InvalidEmptySetError,
// enums

@@ -32,2 +37,2 @@ KeySetTypes,

isKeySetOfStrings, isKeySetOfNumbers, isKeySetOfStringKeyLabels, isKeySetOfNumberKeyLabels, isKeySetSerializedOfNumberKeyLabels, isKeySetSerializedOfNumbers, isKeySetSerializedOfStringKeyLabels, isKeySetSerializedOfStrings, };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5LXNldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIva2V5LXNldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsUUFBUSxFQUNSLFdBQVcsRUFDWCxxQkFBcUIsRUFDckIsWUFBWSxFQUNaLFlBQVksRUFDWixVQUFVLEVBY1YsV0FBVyxHQUVaLE1BQU0saUJBQWlCLENBQUM7QUFDekIsT0FBTyxFQUFFLEdBQUcsRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDL0MsT0FBTyxFQUFFLGFBQWEsRUFBRSxtQkFBbUIsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ3BHLE9BQU8sRUFDTCx5QkFBeUIsRUFDekIsaUJBQWlCLEVBQ2pCLHlCQUF5QixFQUN6QixpQkFBaUIsR0FDbEIsTUFBTSw4QkFBOEIsQ0FBQztBQUN0QyxPQUFPLEVBQ0wsbUNBQW1DLEVBQ25DLDJCQUEyQixFQUMzQixtQ0FBbUMsRUFDbkMsMkJBQTJCLEdBQzVCLE1BQU0seUNBQXlDLENBQUM7QUFDakQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDekUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDckUsT0FBTyxFQUFFLFVBQVUsRUFBRSxJQUFJLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUNsR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bkIsV0FBVztBQUlYLGFBQWE7QUFDYixZQUFZLEVBQ1osZUFBZSxFQUNmLFFBQVEsRUFDUixXQUFXLEVBQ1gsWUFBWSxFQUNaLFlBQVksRUFDWixxQkFBcUIsRUFDckIsa0JBQWtCLEVBQ2xCLHFCQUFxQixFQUNyQixzQkFBc0IsRUFDdEIsc0JBQXNCLEVBQ3RCLCtCQUErQjtBQUMvQixRQUFRO0FBQ1IsVUFBVSxFQUNWLFVBQVUsRUFDVixRQUFRO0FBQ1IsaUJBQWlCO0FBQ2pCLGlCQUFpQixFQUNqQixpQkFBaUIsRUFDakIseUJBQXlCLEVBQ3pCLHlCQUF5QixFQUN6QixtQ0FBbUMsRUFDbkMsMkJBQTJCLEVBQzNCLG1DQUFtQyxFQUNuQywyQkFBMkIsR0FDNUIsQ0FBQyJ9

@@ -5,2 +5,16 @@ # Changelog

## [4.7.0](https://github.com/eturino/ts-key-set/compare/v4.6.0...v4.7.0) (2021-04-29)
### Features
* `ComposedKeySet.compactUnion` and `ComposedKeySet.compactIntersect` ([85f6c4b](https://github.com/eturino/ts-key-set/commit/85f6c4ba2d83d1d98e367a627d08c783d47bea57))
## [4.6.0](https://github.com/eturino/ts-key-set/compare/v4.5.1...v4.6.0) (2021-04-29)
### Features
* composedKeySet that encompass a list of KeySets ([#220](https://github.com/eturino/ts-key-set/issues/220)) ([73de6f8](https://github.com/eturino/ts-key-set/commit/73de6f8e976322b4f7c4a914c013cd21f69fd0eb))
### [4.5.1](https://github.com/eturino/ts-key-set/compare/v4.5.0...v4.5.1) (2021-04-29)

@@ -7,0 +21,0 @@

{
"name": "@eturino/key-set",
"version": "4.5.1",
"version": "4.7.0",
"author": "Eduardo Turiño <eturino@eturino.com>",

@@ -58,6 +58,11 @@ "description": "KeySet with 4 classes to represent concepts of All, None, Some, and AllExceptSome, the last 2 with a sorted uniq list of keys, and all with intersection calculations (TypeScript port of https://github.com/eturino/ruby_key_set)",

},
"dependencies": {},
"dependencies": {
"lodash.sortby": "^4.7.0",
"lodash.uniqwith": "^4.5.0"
},
"devDependencies": {
"@bitjson/npm-scripts-info": "^1.0.0",
"@types/jest": "^26.0.0",
"@types/lodash.sortby": "^4.7.6",
"@types/lodash.uniqwith": "^4.5.6",
"cz-conventional-changelog": "^3.0.2",

@@ -64,0 +69,0 @@ "gh-pages": "^3.0.0",

@@ -12,6 +12,8 @@ # key-set

KeySet with 4 classes to represent concepts of All, None, Some, and AllExceptSome, the last 2 with a sorted uniq list of keys, and all with intersection calculations.
KeySet with 4 classes to represent concepts of `All`, `None`, `Some`, and `AllExceptSome`, the last 2 with a sorted uniq list of keys, and all with intersection calculations.
(TypeScript port of <https://github.com/eturino/ruby_key_set>)
It also has the concept of a `ComposedKeySet` which encapsulates a list of KeySets that can be act upon, and finally collapse using `union` or `intersect`
(Originally, a TypeScript port of <https://github.com/eturino/ruby_key_set>)
Library bootstrapped using [typescript-starter](https://github.com/bitjson/typescript-starter).

@@ -116,5 +118,2 @@

```ts
if (keySet.isEqual(otherKeySet))
```

@@ -270,1 +269,34 @@ ### `invert()`

```
## `ComposedKeySet`
Composition of a list of KeySets.
On a normal use case, this is not needed and it can be solved with `first.intersect(second)` or `first.union(second)`.
But there are other cases where we have to be explicit about the 2 sets that we are intersecting.
e.g.
We have a list of items with labels, where an item can have multiple labels.
We need to filter the items with labels A, B and C but that do not have labels D.
We cannot use `some(A, B, C).intersect(allExceptSome(D))` since that would end up with just `some(A, B, C)`.
So we use `composedKeySet([some(A, B, C), allExceptSome(D)])`.
This way, if we have a search engine that translates key sets like this:
- `All` => `WHERE 1=1`
- `None` => `WHERE 1=0`
- `Some` => `WHERE list.contains(elements)`
- `AllExceptSome` => `WHERE not list.contains(elements)`
then the composed key set above will end up with
`WHERE items.labels.contains(A, B, or C) AND NOT items.labels.contains(D)`
For this case, we have the `ComposedKeySet`
```ts
const comp = composedKeySet([some(A, B, C), allExceptSome(D)]);
```
It can be serialized and parsed as the internal list (array) of KeySets.
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