Reference · Framing, geometry and quiz tools
splitPastedPlacesfunction
A paste split into its lines, on the separators a pasted list actually uses.
Import it
import { splitPastedPlaces } from "@johnmorrisdotca/chizu";
Definition
function splitPastedPlaces(text: string): string[]
Parameters
| Name | Type | Description |
|---|---|---|
text | string | Pasted names or serialized attribute text specified by this signature. |
Returns
string[]
A paste split into its lines, on the separators a pasted list actually uses.
Examples
import { splitPastedPlaces } from "@johnmorrisdotca/chizu";
console.log(splitPastedPlaces("Japan, France\n Brazil;Egypt\t"));
// [ 'Japan', 'France', 'Brazil', 'Egypt' ][ 'Japan', 'France', 'Brazil', 'Egypt' ]What it prints (run when this page was built)