Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/string/index.ts>words

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

Extracts words (in latin characters) from the string.

Examples

Example 1

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

console.log(words("hello world")); // ["hello", "world"]
console.log(words("hello, world")); // ["hello", "world"]
console.log(words("hello-world")); // ["hello", "world"]
console.log(words("hello_world")); // ["hello", "world"]

Parameters

str: string

Returns

string[]