1.0.1 • Published 4 years ago
ifnegative v1.0.1
ifnegative
Check if number is negative.
Installation
- With npm:
npm install ifnegative
- With yarn:
yarn add ifnegative
- From a CDN:
<script src="https://unpkg.com/ifnegative"></script>
Usage
CommonJS
const ifnegative = require("ifnegative");
console.log(ifnegative(-1)); // true
console.log(ifnegative(1)); // false
ES2015 Modules + Bundler
import ifnegative from "ifnegative";
console.log(ifnegative(-1)); // true
console.log(ifnegative(1)); // false
Browser ES2015 Modules
import ifnegative from "https://unpkg.com/ifnegative/lib/index.js";
console.log(ifnegative(-1)); // true
console.log(ifnegative(1)); // false