Calculate

Calculate

  • Docs
  • Help
  • Blog

›Getting Started

Getting Started

  • Installation
  • Updating Calculate

Math

  • Sum
  • Difference
  • Product
  • Quotient
  • Remainder
  • Power
  • Square
  • Cube
  • Factorial

Statistics

  • Mean
  • Median
  • Mode
  • Range

Installation

Calculate is designed to be easily installed and used in your project. Just follow these simple steps below.

Prerequisites

  1. Ensure you have the latest version of Node installed. We also recommend you install Yarn as well.

    Node >= 8.x and Yarn >= 1.5.
  2. Create a project, if none exists, and change your directory to this project's root.

Installing Calculate

This package is available through the npm registry. To install calculate, on the command line, run:

NPM

$ npm -i @princedev/calculate

Yarn

$ yarn add @princedev/calculate

This will create the node_modules directory in your current directory (if one doesn’t exist yet) and will download the package to that directory.

If there is no package.json file in the local directory, the latest version of the package is installed. If there is a package.json file, npm installs the latest version that satisfies the semver rule declared in package.json.

Import

Start using the library by importing it:

CommonJS

const calculate = require('@princedev/calculate');

ES6

import { sum, difference } from '@princedev/calculate';

By now, you should be able to use calculate.

Last updated on 5/6/2020 by Prince Neil Cedrick Castro
Updating Calculate →
  • Prerequisites
  • Installing Calculate
    • NPM
    • Yarn
  • Import
    • CommonJS
    • ES6
Calculate
Docs
Getting StartedGuides
Package
NPMGitHubStar
More
HelpBlog
aws.cedi@gmail.com
Copyright © 2020 Calculate