doc function updates and additions (#387)

This commit is contained in:
Mughur
2023-02-24 13:57:17 +02:00
committed by GitHub
parent 71051cde9c
commit 6839a456ac
27 changed files with 161 additions and 30 deletions

View File

@@ -7,8 +7,12 @@ nFormat() Netscript Function
:param number number: Number to format.
:param string format: Formatting to use. Read http://numeraljs.com/#format for specifics.
:returns: Formatted string.
onverts a number into a string with the specified formatter.
Deprecated, might be removed in 2.3 version of the game. Use :doc:`formatPercent<formatPercent>` for formatting percentages,
:doc:`formatRam<formatRam>` for formatting ram amounts and :doc:`formatNumber<formatNumber>` for formatting other numbers.
Converts a number into a string with the specified formatter.
This uses the numeral.js library, so the formatters must be compatible with that.
Examples: