Skip to content

hoangnh2912/expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published