# nv-facutil-notandor

> simple and,or,not to void too many || and &&

Latest version **1.0.5** (published 2021-09-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-facutil-notandor
pnpm add nv-facutil-notandor
yarn add nv-facutil-notandor
bun add nv-facutil-notandor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-09-29 |
| First published | 2021-01-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |
| Keywords | and, or, not, some, certain |

## Links

- npm: https://www.npmjs.com/package/nv-facutil-notandor
- npm.io page: https://npm.io/package/nv-facutil-notandor

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-09-29
- 1.0.3 — 2021-09-25
- 1.0.2 — 2021-05-02
- 1.0.1 — 2021-05-02
- 1.0.0 — 2021-01-20

## README

nv-facutil-notandor
============
- nv-facutil-notandor is a very simple tool to avoid use too many || && ! 
- make your code readable

install
=======
- npm install nv-facutil-notandor

usage
=====

    const {and,or,at_least_some} = require("nv-facutil-notandor")
    
    function wrap(x,y,z,u) {
        let rslt = and(
            x+y >0,
            and(
                x%z>-300,
                or(y>8,u<100),
                at_least_some(2,y%7!==3,y%7!==5,y%7!==1)
            ),
            or(x*y < 9800,x>-100)
        )
        return(rslt)
    }
    
    > wrap(-100,999,7,50)
    true
    > 


APIS
====

not
---
    not(100) === false
    not(false) === true

and,all
-------
    # all are true
    and(true,false,true) === false
    all(true,false,true) === false

all\_not
--------

    # all are false
    all_not(true,false,false) === false
    all_not(false,false,false) === true

or,any
------

    # any is true
    or(false,true,false) === true
    any(false,true,false) === true
    any(false,false,false) === false

any\_not
--------

    # any is false
    any_not(false,true,true) === true
    any_not(true,true,true) === false

at\_least\_some
---------------

    # at least n are true
    at_least_some(2,false,true,true,true,false) === true
    at_least_some(2,false,true,false,false,false) === false


at\_least\_some\_not
--------------------

    # at least n are false
    at_least_some_not(2,false,true,false,true,false) === true
    at_least_some_not(2,true,true,false,true,true) === false

must\_some
------------

    # only n are true,others are false
    must_some(2,false,true,false,true,false) === true
    must_some(2,false,true,true,true,false) === false


must\_some\_not
-----------------

    # only n are false,others are true
    must_some_not(2,false,true,false,true,false) === false
    must_some_not(2,true,false,false,true,true) === true


one
---

    # only 1 are true,others are false
    one(true,true,false) === false
    one(false,true,false) === true

one\_not
--------

    # only 1 are false,others are true
    one_not(true,true,false) === true
    one_not(false,true,false) === false

at\_least\_certain
------------------

    # at least the-inputed-indexes are true
    at_least_certain([1,3],false,true,false,true,false,false) === true
    at_least_certain([1,3],false,false,false,true,false,false) === false

at\_least\_certain\_not
-----------------------

    # at least the-inputed-indexes are false
    at_least_certain_not([1,3],false,true,false,true,false,false) === false
    at_least_certain_not([1,3],false,false,true,false,true,true) === true

must\_certain
---------------

    # only the-inputed-indexes are true,others are false
    must_certain([1,3],true,true,false,true,false,false) === false
    must_certain([1,3],false,true,false,true,false,false) === true

must\_certain\_not
--------------------

    # only the-inputed-indexes are false,others are true
    must_certain_not([1,3],true,false,false,false,true,true) === false
    must_certain_not([1,3],true,false,true,false,true,true) === true


at\_most\_some: 
---------------
          (max_count,...params)=>Boolean

at\_most\_some\_not:
--------------------
          (max_count,...params)=>Boolean
some\_between
-------------
          (ge,lt,...params)     => Boolean

some\_not\_between
------------------
         (ge,lt,...params) => Boolean


at\_most\_certain:
-------------------
        #only the-inputed-indexes maybe-true,others are false
        (whiches,...params)=>Boolean,

at\_most\_certain\_not:
-----------------------
         #only the-inputed-indexes maybe-false,others are true
         (whiches,...params)=>Boolean,


LICENSE
=======
- ISC

---
_Source: https://npm.io/package/nv-facutil-notandor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
