mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
6024c81113
* Move lastAugReset and lastNodeReset back to main API under getResetInfo, also included currentNode. * The associated properties are deprecated on getPlayer()
1017 B
1017 B
Home > bitburner > NS > nFormat
NS.nFormat() method
Warning: This API is now obsolete.
Use ns.formatNumber, formatRam, or formatPercent instead. Will be removed in 2.4.
Format a number using the numeral library. This function is deprecated and will be removed in 2.4.
Signature:
nFormat(n: number, format: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
n | number | Number to format. |
format | string | Formatting options. See http://numeraljs.com/#format for valid formats. |
Returns:
string
Formatted number.
Remarks
RAM cost: 0 GB
Converts a number into a string with the specified format options. See http://numeraljs.com/#format for documentation on format strings supported.
This function is deprecated and will be removed in 2.3.