Published
Edited
Aug 25, 2019
1 fork
Importers
Insert cell
Insert cell
Insert cell
Insert cell
satoshi = jit`
## 聡 — Satoshi

₿ ⨕ ${['calc', btcCalc]}
聡 ⨕ ${['calcSatoshi', btcCalcSatoshi]}
µ ⨕ ${['calcMilli', btcCalcMilli]}

5,400 USD in Bitcoin is: ₿5400 , 0.51 BTC in USD is: 0.51₿

220 GBP in Satoshis is: GBP聡220 , 15 USD in Satoshis: USD聡15

5,400 USD in Milli Bitcoin is: µ5400
`
Insert cell
Insert cell
jibtc`
123 USD in btc: ₿123`
Insert cell
btc = jit`
### // Alternative binding

₿ ⨕ ${['btc', coinCalc()]}
聡 ⨕ ${['satoshi', coinCalc(false, ['Satoshi', Math.pow(10, 8), '0,0', false, Math.floor])]}


5,400 USD in Bitcoin is: ₿5400


5,400 USD in Milli Bitcoin is: µ₿5400
`
Insert cell
jibtc = btc.jitranslate
Insert cell
Insert cell
btcCalc = coinCalc(false, ['BTC', 1, '0,0.000', '₿'])
Insert cell
btcCalcMilli = (left, right) => console.log('calculating millis', {left, right}) || coinCalc()(left + 'µ', right)
Insert cell
btcCalcSatoshi = coinCalc(false, ['Satoshi', Math.pow(10, 8), '0,0', false, Math.floor])
Insert cell
_ = require('lodash')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more