math librarymathlib-nmathlibmathlib-nmathlib-nmathlib-nnodejsmatameticsmathlib-nmath librarymathmathlibmath librarymathlibmathlib-nmathmathjsmath librarymathjsmathlib-nmathlib-nmathjsnodejsmathmathjsmathlibjsmathlib-nmathlibjsmathjsmath

Mathlib-n More..

Overview

mathlib

mathlib() is a function that can be used to get status. It will run an animation in your terminal. It's not for any mathematical purpose. It's an ester egg of mathlib function. Just wait a while and after a few seconds you will be able to know the mode, status, record (how many calculation data do you have), trush (how many calculation data is in trush folder.) and restored(how many file are restored from trush.) etc. At the very first mode should be normal, status null, record,trush and restored should be 0;

setmode

setmode is a function that can be used to set mode. It will set the mode of calculation. There are three modes avilable in mathlib-n. They are normal, scientific and fixed. And status range is 1-14. You can set mode by using setmode(mode,status). like :

    const mathlib = require('mathlib-n');
    mathlib.setmode('sci', 5); // set mode to scientific and status to 5
or to set mode to fixed :
    const mathlib = require('mathlib-n');
    mathlib.setmode('fix', 5); // set mode to fixed and status to 5

or you can use setmode() to set mode to normal and status to null.

getmode

getmode is a function that is used to get current mode. It will return the mode of calculation. There are three modes avilable in mathlib-n. They are normal, scientific and fixed. You can get mode by using getmode(). like :

    const mathlib = require('mathlib-n');
    mathlib.getmode(); // return current mode
if mode if fixed and status is 7 then output should be:
    {
        mode: 'fixed',
        status: 7
    }