# is-negative

> Check if something is a negative number

Latest version **2.1.0** (published 2016-01-11) · MIT license · 0 weekly downloads

> **Better alternative:** Use (n) => n < 0 — Consider using a lighter alternative

## Install

```sh
npm install is-negative
pnpm add is-negative
yarn add is-negative
bun add is-negative
```

## 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 | 2.1.0 |
| Published | 2016-01-11 |
| First published | 2015-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Kevin Martensson |
| Maintainers | kevva |
| Keywords | negative, number, test, check |

## Links

- npm: https://www.npmjs.com/package/is-negative
- Repository: https://github.com/kevva/is-negative
- Homepage: https://github.com/kevva/is-negative#readme
- Issues: https://github.com/kevva/is-negative/issues
- npm.io page: https://npm.io/package/is-negative

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2016-01-11
- 2.0.2 — 2015-07-11
- 2.0.1 — 2015-07-11
- 2.0.0 — 2015-07-10
- 1.0.1 — 2015-06-02
- 1.0.0 — 2015-06-02

## README

# is-negative [![Build Status](https://travis-ci.org/kevva/is-negative.svg?branch=master)](https://travis-ci.org/kevva/is-negative)

> Check if something is a negative number


## Install

```
$ npm install --save is-negative
```


## Usage

```js
const isNegative = require('is-negative');

isNegative(-1);
//=> true

isNegative(1);
//=> false

isNegative(0);
//=> false

isNegative('-1');
//=> false

isNegative(Number(-1))
//=> true
```

_Note: This module doesn't consider `-0` to be a negative number. If you want to detect `-0`, use the [`negative-zero`](https://github.com/sindresorhus/negative-zero) module._


## Related

- [is-positive](https://github.com/kevva/is-positive) - Check if something is a positive number


## License

MIT © [Kevin Martensson](http://github.com/kevva)

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