word-break
v0.0.5
Published
word-break util for npl
Downloads
3
Readme
word-break
word-break util using a given dictionary
TypeScript
import wordBreak from "word-break";
test("wordBreak", () => {
const input = "ilikesamsung";
const dict = ["samsung", "like", "i"];
const list = wordBreak(input, dict);
expect(list.join("|")).toBe("i|like|samsung");
});