# positive-or-zero

> Converts negatives to zero, leaves positives alone

Latest version **1.0.0** (published 2016-12-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install positive-or-zero
pnpm add positive-or-zero
yarn add positive-or-zero
bun add positive-or-zero
```

## 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.0 |
| Published | 2016-12-27 |
| First published | 2016-12-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Terence O'Neill |
| Maintainers | trystal |

## Links

- npm: https://www.npmjs.com/package/positive-or-zero
- Repository: https://github.com/trystal/positive-or-zero
- Homepage: https://github.com/trystal/positive-or-zero#readme
- Issues: https://github.com/trystal/positive-or-zero/issues
- npm.io page: https://npm.io/package/positive-or-zero

## Recent versions

- 1.0.0 (latest) — 2016-12-27

## README

# positive-or-zero

A Node.js package that returns VALUE if VALUE is positive, zero in every other case

## Usage

First, install the package using npm: 

    npm install positive-or-zero --save

Then, require the package and use it like so:

    var positiveOrZero = require('positive-or-zero')

    console.log(positiveOrZero(100))  // 100

    console.log(positiveOrZero(0))    // 0
    console.log(positiveOrZero(-100)) // 0
    console.log(positiveOrZero(null)) // 0
    console.log(positiveOrZero())     // 0

## Licence

Apache 2.0

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