1.0.1 • Published 5 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)); // falseES2015 Modules + Bundler
import ifnegative from "ifnegative";
console.log(ifnegative(-1)); // true
console.log(ifnegative(1)); // falseBrowser ES2015 Modules
import ifnegative from "https://unpkg.com/ifnegative/lib/index.js";
console.log(ifnegative(-1)); // true
console.log(ifnegative(1)); // false