1.4.2 • Published 4 years ago

@hu-bcs1/islamic-inheritance-calculator v1.4.2

Weekly downloads
14
License
MIT
Repository
-
Last release
4 years ago

islamic-inheritance-calculator

NB: This a work in progress. if you spot an error in calculations, then please file an issue

install

$ npm i @hu-bcs1/islamic-inheritance-calculator

usage

import { defaultHeirs, calculate } from 'islamic-inheritance-calculator'

function printResults(results) {
  const fractionToString = r => ({ ...r, share: r.share.toFraction() })
  console.log(results.map(fractionToString))
}

const result = calculate({ wife: 3, son: 1, daughter: 1 })
printResuls(result)
//=> [
//     { name: 'wife',     count: 3, type: 'fard',  share: '1/8'  },
//     { name: 'son',      count: 1, type: 'tasib', share: '7/12' },
//     { name: 'daughter', count: 1, type: 'tasib', share: '7/24' }
//   ]

TODO

1.4.2

4 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago