bitburner-src/markdown/bitburner.ns.nformat.md

36 lines
889 B
Markdown
Raw Normal View History

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [nFormat](./bitburner.ns.nformat.md)
## NS.nFormat() method
Format a number using the numeral library. This function is deprecated and will be removed in 2.3.
**Signature:**
```typescript
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.