
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
kmap-solver-lib
Advanced tools
This is a utility function that is using in kmap-solver to solve Karnaugh Maps up to 4 variables.
npm i kmap-solver-lib
kmap-solver-lib takes 3 parameters and returns an object that holds groups and the simplified expression.
type KMapCell = {
binary: string;
decimal: number;
row: number;
col: number;
}
type KMapResult = {
groups: KMapCell[][];
expression: string;
}
solve(variables: string[], minterms: number[], dontcares?: number[]): KMapResult;
const solve = require('kmap-solver-lib');
const variables = ['x', 'y', 'z'];
const minterms = [0, 1, 3, 4, 5, 6];
// placement
// 0 | 1
// 2 | 3
// 6 | 7
// 4 | 5
// optional
// const dontcares = []
solve(variables, minterms);
// output
//{
// groups: [
// [
// { binary: '000', decimal: 0, row: 0, col: 0 },
// { binary: '001', decimal: 1, row: 0, col: 1 },
// { binary: '100', decimal: 4, row: 3, col: 0 },
// { binary: '101', decimal: 5, row: 3, col: 1 }
// ],
// [
// { binary: '011', decimal: 3, row: 1, col: 1 },
// { binary: '001', decimal: 1, row: 0, col: 1 }
// ],
// [
// { binary: '110', decimal: 6, row: 2, col: 0 },
// { binary: '100', decimal: 4, row: 3, col: 0 }
// ]
// ],
// expression: `y'+x'z+xz'`
//}
FAQs
A utility function to solve karnaugh maps up to 4 variables
We found that kmap-solver-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.