UNPKG

@hckrnews/logic-gates

Version:

Generate logic gates without thinking.

13 lines (9 loc) 252 B
import Gate from './Gate.mjs'; class NotGate extends Gate { generateOutput() { this.output = this.inputs.map((item) => !item); } } const not = (input) => NotGate.create(input).output; export default NotGate; export { NotGate, not };