UNPKG

@hckrnews/logic-gates

Version:

Generate logic gates without thinking.

13 lines (9 loc) 253 B
import Gate from './Gate.mjs'; class NandGate extends Gate { generateOutput() { this.output = !this.inputs.every(Boolean); } } const nand = (input) => NandGate.create(input).output; export default NandGate; export { NandGate, nand };