UNPKG
@hckrnews/logic-gates
Version:
latest (2.0.4)
2.0.4
2.0.3
2.0.2
2.0.0
1.0.2
1.0.1
1.0.0
Generate logic gates without thinking.
github.com/hckrnews/logic-gates
hckrnews/logic-gates
@hckrnews/logic-gates
/
src
/
AndGate.mjs
13 lines
(9 loc)
•
246 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
import
Gate
from
'./Gate.mjs'
;
class
AndGate
extends
Gate
{
generateOutput
(
) {
this
.
output
=
this
.
inputs
.
every
(
Boolean
); } }
const
and
= (
input
) =>
AndGate
.
create
(input).
output
;
export
default
AndGate
;
export
{
AndGate
, and };