Skip to content

asBytes

Module Export

text |> [byte]

Turns a text into a list of bytes using UTF-8 encoding.

Example

import { asBytes } from 'text'
from 'Hello world' asBytes
// Returns:
[72,101,108,108,111,32,119,111,114,108,100]