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

@thi.ng/arrays

Package Overview
Dependencies
Maintainers
0
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/arrays - npm Package Compare versions

Comparing version 2.9.14 to 2.10.0

10

CHANGELOG.md
# Change Log
- **Last updated**: 2024-08-10T15:03:07Z
- **Last updated**: 2024-08-18T14:11:34Z
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)

@@ -12,2 +12,10 @@

## [2.10.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/arrays@2.10.0) (2024-08-18)
#### 🚀 Features
- update topoSort() ([6606d08](https://github.com/thi-ng/umbrella/commit/6606d08))
- add missing node check/assertion
- update `deps` fn to incl. node ID as 2nd arg
### [2.9.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/arrays@2.9.7) (2024-06-21)

@@ -14,0 +22,0 @@

16

package.json
{
"name": "@thi.ng/arrays",
"version": "2.9.14",
"version": "2.10.0",
"description": "Array / Arraylike utilities",

@@ -39,8 +39,8 @@ "type": "module",

"dependencies": {
"@thi.ng/api": "^8.11.8",
"@thi.ng/checks": "^3.6.10",
"@thi.ng/compare": "^2.4.0",
"@thi.ng/equiv": "^2.1.64",
"@thi.ng/errors": "^2.5.14",
"@thi.ng/random": "^4.0.2"
"@thi.ng/api": "^8.11.9",
"@thi.ng/checks": "^3.6.11",
"@thi.ng/compare": "^2.4.1",
"@thi.ng/equiv": "^2.1.65",
"@thi.ng/errors": "^2.5.15",
"@thi.ng/random": "^4.0.3"
},

@@ -172,3 +172,3 @@ "devDependencies": {

},
"gitHead": "ec78f98d015e4d214a0b840e72e497407807daf3\n"
"gitHead": "f6e26ea1142525171de5d36b9c3119f2782bb437\n"
}

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

> [!NOTE]
> This is one of 198 standalone projects, maintained as part
> This is one of 199 standalone projects, maintained as part
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo

@@ -13,0 +13,0 @@ > and anti-framework.

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

import type { Fn, Nullable, IObjectOf } from "@thi.ng/api";
import type { Fn2, IObjectOf, Nullable } from "@thi.ng/api";
/**

@@ -40,5 +40,4 @@ * Takes an object describing a DAG of nodes of type T with keys being node IDs.

* @param deps
* @returns
*/
export declare const topoSort: <T>(nodes: IObjectOf<T>, deps: Fn<T, Nullable<string[]>>) => string[];
export declare const topoSort: <T>(nodes: IObjectOf<T>, deps: Fn2<T, string, Nullable<string[]>>) => string[];
//# sourceMappingURL=topo-sort.d.ts.map

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

import { illegalState } from "@thi.ng/errors";
import { assert } from "@thi.ng/errors/assert";
const topoSort = (nodes, deps) => {

@@ -6,5 +6,6 @@ const cycles = {};

const sort = (id, path) => {
if (cycles[id]) illegalState(`dependency cycle: ${path.join(" -> ")}`);
assert(nodes[id] != null, `missing node: ${id}`);
assert(!cycles[id], `dependency cycle: ${path.join(" -> ")}`);
cycles[id] = true;
const nodeDeps = deps(nodes[id]);
const nodeDeps = deps(nodes[id], id);
if (nodeDeps) {

@@ -11,0 +12,0 @@ for (let d of nodeDeps) sort(d, [...path, d]);

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