op-expression

1.0.1 • Public • Published

op-expression NPM version NPM monthly downloads NPM total downloads Linux Build Status

Using and and or operators in JavaScript expressions.

Install

Install with npm:

npm install --save op-expression

Install with yarn:

yarn add op-expression

Usage

import { and, or } from "op-expression";

const isTrue = true;
const isFalse = false;

const result = and(isTrue, isFalse);
console.log(result); // false

const result = or(isTrue, isFalse);
console.log(result); // true

const result = or(isTrue, isFalse, isFalse, isFalse);
console.log(result); // true

const result = and(isTrue, isFalse, isFalse, isFalse);
console.log(result); // false

const result = and(isTrue, isTrue, or(isFalse, isTrue));
console.log(result); // true

About

Contributors

Commits Contributor
1 hoangnh2912

Author

HoangNH

License

Copyright © 2023, Nguyen Hai Hoang. Released under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i op-expression

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

3.96 kB

Total Files

5

Last publish

Collaborators

  • neckgamervn