5.0.0 • Published 3 years ago

@aureooms/js-poset v5.0.0

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
3 years ago

:spider_web: @aureooms/js-poset

Partially ordered sets algorithms for JavaScript. See docs. Parent is @aureooms/js-algorithms.

import {minima} from '@aureooms/js-poset';
import {increasing} from '@aureooms/js-compare';

const a = [4, 12, 2, 6, 3];

const divides = (a, b) => b % a === 0;
const n = minima(divides, a, 0, a.length); // 2
a.slice(0, n).sort(increasing); // 2 3

const norel = (_a, _b) => false;
minima(norel, a, 0, a.length); // a.length

License Version Build Dependencies Dev dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size