Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more
Module

x/ayonli_jsext/esm/string/index.js>chars

A JavaScript extension package for building strong and modern applications.
Latest
function chars
import { chars } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/string/index.js";

Returns the characters of the string (emojis are supported).

Examples

Example 1

import { chars } from "@ayonli/jsext/string";

console.log(chars("Hello, World!")); // ["H", "e", "l", "l", "o", ",", " ", "W", "o", "r", "l", "d", "!"]
console.log(chars("δ½ ε₯½οΌŒδΈ–η•ŒοΌ")) // ["δ½ ", "ε₯½", ",", "δΈ–", "η•Œ", "!"]
console.log(chars("πŸ˜΄πŸ˜„β›”πŸŽ πŸš“πŸš‡πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘§πŸ‘¦πŸΎ")); // ["😴", "πŸ˜„", "β›”", "🎠", "πŸš“", "πŸš‡", "πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘§", "πŸ‘¦πŸΎ"]