mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
work on doc
This commit is contained in:
30
markdown/bitburner.ns.peek.md
Normal file
30
markdown/bitburner.ns.peek.md
Normal file
@@ -0,0 +1,30 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [peek](./bitburner.ns.peek.md)
|
||||
|
||||
## NS.peek() method
|
||||
|
||||
This function is used to peek at the data from a port. It returns the first element in the specified port without removing that element. If the port is empty, the string “NULL PORT DATA” will be returned.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
peek(port: Port): string | number | object;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| port | [Port](./bitburner.port.md) | Port to peek. Must be an integer between 1 and 20. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
string \| number \| object
|
||||
|
||||
Data in the specified port.
|
||||
|
||||
## Remarks
|
||||
|
||||
1 GB
|
||||
|
||||
Reference in New Issue
Block a user