[CI Skip] 0.32.4

This commit is contained in:
Travis CI
2018-10-19 15:38:45 +00:00
parent 1fb1f9d743
commit d7b83e3d91
243 changed files with 17626 additions and 40 deletions
+37
View File
@@ -0,0 +1,37 @@
# Functions
<a id="buffertou8a"></a>
## bufferToU8a
▸ **bufferToU8a**(buffer?: * `Buffer` &#124; `number`[]*): `Uint8Array`
*Defined in [buffer/toU8a.ts:20](https://github.com/polkadot-js/common/blob/1fb1f9d/packages/util/src/buffer/toU8a.ts#L20)*
*__name__*: bufferToU8a
*__signature__*: bufferToU8a (value?: Buffer): string
*__summary__*: Creates a Uint8Array value from a Buffer object.
*__description__*: `null` inputs returns an empty result, `Buffer` values return the actual value as a `Uint8Array`. Anything that is not a `Buffer` object throws an error.
*__example__*:
```javascript
import { bufferToU8a } from '@polkadot/util';
bufferToU8a(Buffer.from([1, 2, 3]));
```
**Parameters:**
| Param | Type |
| ------ | ------ |
| `Optional` buffer | `Buffer` &#124; `number`[]|
**Returns:** `Uint8Array`
___