Comparing version 1.0.0 to 1.0.1
28
index.js
@@ -0,1 +1,3 @@ | ||
#!/usr/bin/env node | ||
const chalk = require('chalk') | ||
@@ -5,8 +7,2 @@ const np2 = require('next-pow-2') | ||
const METHOD = '!a!b + !abc + a!bde + cde + !bcd + !bce + !a!ce + !abd!e' | ||
const TRUTHS = [ | ||
0, 1, 2, 3, 4, 5, 6, 7, | ||
9, 10, 11, 12, 13, 14, 15, | ||
19, 21, 22, 23, 31 | ||
] | ||
const POWERS = { | ||
@@ -39,2 +35,12 @@ 1: 0, | ||
const expandImplicant = (implicant) => { | ||
const idx = implicant.indexOf('-') | ||
if (!~idx) return [ implicant ] | ||
return [ | ||
...expandImplicant(replaceAt(implicant, idx, '0')), | ||
...expandImplicant(replaceAt(implicant, idx, '1')) | ||
] | ||
} | ||
const parseMethod = (method) => { | ||
@@ -324,12 +330,2 @@ const words = method.split('+') | ||
// Select essential ones | ||
const expandImplicant = (implicant) => { | ||
const idx = implicant.indexOf('-') | ||
if (!~idx) return [ implicant ] | ||
return [ | ||
...expandImplicant(replaceAt(implicant, idx, '0')), | ||
...expandImplicant(replaceAt(implicant, idx, '1')) | ||
] | ||
} | ||
const map = {} | ||
@@ -336,0 +332,0 @@ for (const implicant of primeImplicants) { |
{ | ||
"name": "kluski", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
@@ -14,3 +14,6 @@ "license": "MIT", | ||
"repository": "https://github.com/pb-students/kluski", | ||
"description": "Quine-McCluskey tools" | ||
"description": "Quine-McCluskey tools", | ||
"bin": { | ||
"kluski": "index.js" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11061
359