Skip to the content

Tane種

Reproduce numbers from a seed, shuffle or pick items, share a daily puzzle and resume a saved stream.

Tane means seed in Japanese. About the name

Contents

Reference · Picker element

parsePickerItemsfunction

Reads a bounded list, one item per line or a JSON string array.

Import it

import { parsePickerItems } from "@johnmorrisdotca/tane/element";

Also exported from: @johnmorrisdotca/tane/element/define

Definition

function parsePickerItems(text: string | null): string[] | null

Parameters

NameTypeDescription
textstring | null

The list, or null for the example list.

Returns

string[] | null

Trimmed nonempty items, or null for malformed, empty or oversized input.

Examples

import { parsePickerItems } from "@johnmorrisdotca/tane/element";
console.log(parsePickerItems("A\nB\nC"));
[ 'A', 'B', 'C' ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tane 1.3.0.