Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

complexnum

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complexnum

A Javascript library to solve complex numbers

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

complexnum

Build Status Code Issues Coverage Status

Introduction

  • complexnum is a Javascript complex number solving app.
  • It has the following features;
    • Add two complex numbers and return the result.
    • Multiply two complex numbers and return the result.
    • Perform division operation on two complex numbers and return the result.
    • Perform subtraction operation on two complex numbers
    • Return the conjugate of a complex number.

Dependencies

  • This is a library thus, requires minimal dependencies.

  • For testing purposes the following would be required

  • For the console app, the following would be required

    • figlet-Creates ASCII Art from text.
    • chalk- String styling for the terminal.
    • readline-sync- Synchronously read users terminal input.
    • clear- Clears the terminal screen.

Installation

  • Navigate to directory of choice on terminal.

    npm install complexnum

Usage

var yourObject = require("complexnum");
var arg1 = new yourObject(2, 3),
	arg2 = new yourObject(4, 5);

console.log(yourObject.add(arg1, arg2));

Output should be {6, 8i}

Test

npm test

Contributing

Contributions encouraged but please take note to adhere to existing coding style. Unit tests can be added for any new or changed functionality

FAQs

Package last updated on 24 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc