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

@thi.ng/associative

Package Overview
Dependencies
Maintainers
1
Versions
294
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/associative - npm Package Compare versions

Comparing version 6.2.24 to 6.2.25

14

CHANGELOG.md
# Change Log
- **Last updated**: 2023-02-05T14:42:21Z
- **Last updated**: 2023-02-10T13:55:29Z
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)

@@ -12,2 +12,14 @@

### [6.2.25](https://github.com/thi-ng/umbrella/tree/@thi.ng/associative@6.2.25) (2023-02-10)
#### 🩹 Bug fixes
- [#375](https://github.com/thi-ng/umbrella/issues/375) update .set() for existing keys ([4c1da10](https://github.com/thi-ng/umbrella/commit/4c1da10))
- when updating existing keys, add missing value propagation
for intermediate nodes
- add tests
- [#375](https://github.com/thi-ng/umbrella/issues/375) fix SortedMap.delete(), add fuzz test ([ccbdfeb](https://github.com/thi-ng/umbrella/commit/ccbdfeb))
- fix issue which caused lane corruption and detached heads
- add fuzz test repeatedly setting/deleting keys
### [6.2.24](https://github.com/thi-ng/umbrella/tree/@thi.ng/associative@6.2.24) (2023-02-05)

@@ -14,0 +26,0 @@

20

package.json
{
"name": "@thi.ng/associative",
"version": "6.2.24",
"version": "6.2.25",
"description": "Alternative Map and Set implementations with customizable equality semantics & supporting operations",

@@ -37,12 +37,12 @@ "type": "module",

"dependencies": {
"@thi.ng/api": "^8.7.0",
"@thi.ng/arrays": "^2.5.2",
"@thi.ng/binary": "^3.3.17",
"@thi.ng/api": "^8.7.1",
"@thi.ng/arrays": "^2.5.3",
"@thi.ng/binary": "^3.3.18",
"@thi.ng/checks": "^3.3.8",
"@thi.ng/compare": "^2.1.23",
"@thi.ng/dcons": "^3.2.31",
"@thi.ng/compare": "^2.1.24",
"@thi.ng/dcons": "^3.2.32",
"@thi.ng/equiv": "^2.1.18",
"@thi.ng/errors": "^2.2.9",
"@thi.ng/random": "^3.3.22",
"@thi.ng/transducers": "^8.3.31",
"@thi.ng/errors": "^2.2.10",
"@thi.ng/random": "^3.3.23",
"@thi.ng/transducers": "^8.3.32",
"tslib": "^2.5.0"

@@ -193,3 +193,3 @@ },

},
"gitHead": "50ba9c87676fac60c46d2bc0e4d2c7711a374a68\n"
"gitHead": "2b5a99a8af71670780875637299be9118b01084d\n"
}

@@ -186,3 +186,3 @@ <!-- This file is generated - DO NOT EDIT! -->

Package sizes (brotli'd, pre-treeshake): ESM: 6.64 KB
Package sizes (brotli'd, pre-treeshake): ESM: 6.68 KB

@@ -199,2 +199,3 @@ ## Dependencies

- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
- [@thi.ng/random](https://github.com/thi-ng/umbrella/tree/develop/packages/random)
- [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/develop/packages/transducers)

@@ -201,0 +202,0 @@ - [tslib](https://www.typescriptlang.org/)

@@ -31,4 +31,31 @@ import type { Fn3, IObjectOf, Pair } from "@thi.ng/api";

[Symbol.iterator](): IterableIterator<Pair<K, V>>;
/**
* Yields iterator of sorted `[key, value]` pairs, optionally taking given
* `key` and `max` flag into account.
*
* @remarks
* If `key` is given and `max=false`, the key is used as minimum search key
* and the iterator will only yield pairs for which keys are `>=` given key.
* If `max=true`, the given is used as maximum and only yields pairs for
* which keys are `<=` given key.
*
* If **no** key is given, yields **all** pairs.
*
* @param key
* @param max
*/
entries(key?: K, max?: boolean): IterableIterator<Pair<K, V>>;
/**
* Similar to {@link SortedMap.entries}, but only yield sequence of keys.
*
* @param key
* @param max
*/
keys(key?: K, max?: boolean): IterableIterator<K>;
/**
* Similar to {@link SortedMap.entries}, but only yield sequence of values.
*
* @param key
* @param max
*/
values(key?: K, max?: boolean): IterableIterator<V>;

@@ -78,4 +105,4 @@ clear(): void;

/**
* Returns the first matching (or predecessor) node for given key at the
* level closest to the head.
* Returns the first matching (or predecessor) node for given key (NOT
* necessarily at the lowest level).
*

@@ -82,0 +109,0 @@ * @param key

@@ -61,2 +61,17 @@ var SortedMap_1;

}
/**
* Yields iterator of sorted `[key, value]` pairs, optionally taking given
* `key` and `max` flag into account.
*
* @remarks
* If `key` is given and `max=false`, the key is used as minimum search key
* and the iterator will only yield pairs for which keys are `>=` given key.
* If `max=true`, the given is used as maximum and only yields pairs for
* which keys are `<=` given key.
*
* If **no** key is given, yields **all** pairs.
*
* @param key
* @param max
*/
*entries(key, max = false) {

@@ -89,5 +104,17 @@ if (key === undefined) {

}
/**
* Similar to {@link SortedMap.entries}, but only yield sequence of keys.
*
* @param key
* @param max
*/
keys(key, max = false) {
return map((p) => p[0], this.entries(key, max));
}
/**
* Similar to {@link SortedMap.entries}, but only yield sequence of values.
*
* @param key
* @param max
*/
values(key, max = false) {

@@ -151,2 +178,6 @@ return map((p) => p[1], this.entries(key, max));

node.v = val;
while (node.down) {
node = node.down;
node.v = val;
}
return this;

@@ -159,3 +190,3 @@ }

while (rnd.float() < p) {
// check if new head is needed
// check if new head (at a new level) is needed
if (currLevel >= headLevel) {

@@ -203,3 +234,3 @@ const newHead = new Node(undefined, undefined, headLevel + 1);

// patch up head
while ($this.head.next && $this.head.down) {
while (!$this.head.next && $this.head.down) {
$this.head = $this.head.down;

@@ -285,4 +316,4 @@ $this.head.up = undefined;

/**
* Returns the first matching (or predecessor) node for given key at the
* level closest to the head.
* Returns the first matching (or predecessor) node for given key (NOT
* necessarily at the lowest level).
*

@@ -289,0 +320,0 @@ * @param key

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