mirror of
https://github.com/heyman/heynote.git
synced 2024-11-21 23:43:22 +01:00
Move Math blocks' format and toLocaleString() example from README into docs/
This commit is contained in:
parent
e84b36273a
commit
8e24fe9e98
@ -77,6 +77,14 @@ _format = format # store reference to the built in format
|
||||
format(x) = _format(x, {notation:"exponential"})
|
||||
```
|
||||
|
||||
You can also do something like this to show the number with your default locale or provide a [custom one](https://www.w3.org/International/articles/language-tags/):
|
||||
|
||||
```
|
||||
format(x) = x.toLocaleString();
|
||||
format(x) = x.toLocaleString('en-GB');
|
||||
```
|
||||
|
||||
|
||||
See the [Math.js format()](https://mathjs.org/docs/reference/functions/format.html) function for more info on what's supported.
|
||||
|
||||
## The buffer file
|
||||
|
Loading…
Reference in New Issue
Block a user