Files
common/docs/util-rlp/modules/_encoder_index_.md
T
2018-11-21 11:31:24 +00:00

39 lines
678 B
Markdown

# Functions
<a id="encoder"></a>
## encoder
▸ **encoder**(input: *`any`*): `Uint8Array`
*Defined in [encoder/index.ts:24](https://github.com/polkadot-js/common/blob/3bc1b75/packages/util-rlp/src/encoder/index.ts#L24)*
*__name__*: encoder
*__signature__*: encoder (input: any): Uint8Array
*__summary__*: Encodes the input value into RLP.
*__description__*: From an input, calculate the RLP and return the result as a `Uint8Array`.
*__example__*:
```javascript
import { encode } from '@polkadot/util-rlp';
encode('dog'); // => [0x83, 0x64, 0x6f, 0x67]
```
**Parameters:**
| Name | Type |
| ------ | ------ |
| input | `any` |
**Returns:** `Uint8Array`
___