Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ifpositive

leoguy778MIT1.0.1

check if number is positive

readme

ifpositive

Check if number is positive.

Installation

  • With npm:
npm install ifpositive
  • With yarn:
yarn add ifpositive
  • From a CDN:
<script src="https://unpkg.com/ifpositive"></script>

Usage

CommonJS

const ifpositive = require("ifpositive");

console.log(ifpositive(-1)); // false
console.log(ifpositive(1)); // true

ES2015 Modules + Bundler

import ifpositive from "ifpositive";

console.log(ifpositive(-1)); // false
console.log(ifpositive(1)); // true

Browser ES2015 Modules

import ifpositive from "https://unpkg.com/ifpositive/lib/index.js";

console.log(ifpositive(-1)); // false
console.log(ifpositive(1)); // true