From c02d2d4587b581f76a2a482c6152438381ba6e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AB=E3=83=AF=E3=83=AA=E3=83=9F=E4=BA=BA=E5=BD=A2?= Date: Wed, 31 May 2023 13:46:21 +0900 Subject: [PATCH] fix: use spread syntax to separate input --- TinySegmenter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TinySegmenter.js b/TinySegmenter.js index 2388cb6..06758e0 100644 --- a/TinySegmenter.js +++ b/TinySegmenter.js @@ -81,7 +81,7 @@ const segment = (input) => { const result = []; const seg = ["B3","B2","B1"]; const ctype = ["O","O","O"]; - const o = input.split(""); + const o = [...input]; for (const i of o) { seg.push(i); ctype.push(ctype_(i))