1.0.4 • Published 5 years ago

arithmetic-operation-with-prefix-zero v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

arithmetic-operation-with-prefix-zero

arithmetic operation without losing prefix zero

include somewhere at the beginning

require('arithmetic-operation-with-prefix-zero')

##Functionalities: 1.Addition 2.Subtraction 3.Multiplication 4.Division

##Syntax:

var test = require('arithmetic-operation-with-prefix-zero');

######1.Addition:

test.addWithZero(target number in string format,addValue)

######2.Subtraction:

test.subWithZero(target number in string format,subValue)

######3.Multiplication

test.multiplyWithZero(target number in string format,multiplyValue)

######4.Division

test.divWithZero(target number in string format,divValue)

##Example to use :

var test = require('arithmetic-operation-with-prefix-zero');

#For addition :

test.addWithZero('001',1)
 o/p : '002'

 or

 test.addWithZero('001',"1")
 o/p : '002'

 #For subtraction :

 test.subWithZero('001',1)
 o/p : '000'

 or

 test.subWithZero('001',"1")
 o/p : '000'

  #For multiplication :

 test.multiplyWithZero('001',10)
 o/p : '010'

 or

 test.multiplyWithZero('001',"-10")
 o/p : '-010'

 #For Division :

 test.divWithZero('0100',2)
 o/p : '050'

 or

 test.divWithZero('0100',"-2")
 o/p : '-050'

Contact
:iphone: 8124359871 :email :ndnaveensweeebe@gmail.com

Thankyou :blush: