@panda-clouds/number

1.0.0 • Public • Published

PCNumber

maintained by PandaClouds.com

PCNumber is a lightweight JavaScript library for Node.js that provides additional Number methods.

Installation

  1. If you want to use this library, you first need to install the Node.js.

  2. When you install node.js, will also be installed npm.

  3. Please run the following command.

npm install --save @panda-clouds/number

Usage

Node.js

const PCNumber = require('@panda-clouds/number');

// example usage
PCNumber.isNumber(5) // => true
PCNumber.isNumber("5") // => false

You can replace PCNumber with any variable.

Methods

Unit Tests are an additional resource for learning functionality.

- isNumber()

returns if the object is a number object

Example:

PCNumber.isNumber(-5) // => true
PCNumber.isNumber(0) // => true
PCNumber.isNumber(5) // => true

PCNumber.isNumber("5") // => false
PCNumber.isNumber(null) // => false
PCNumber.isNumber() // => false

Contributions

Pull requests are welcome! here is a checklist to speed things up:

  • modify PCNumber.js
  • add unit tests in PCNumber.spec.js
  • run npm test
  • document method in README.md
  • add your name to 'Contributors' in README.md

Contributors

(Add your name)

/@panda-clouds/number/

    Package Sidebar

    Install

    npm i @panda-clouds/number

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.72 kB

    Total Files

    9

    Last publish

    Collaborators

    • mrmarcsmith