Skip to content

Commit

Permalink
nodeOrBrowserのエラーメッセージを改善し、期待される値を明示化
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Dec 7, 2024
1 parent 55c61b1 commit dedd3b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TokenizerBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function TokenizerBuilder(option) {
const node_or_browser = option.nodeOrBrowser;
if (node_or_browser != "node" && node_or_browser != "browser") {
throw new Error(
`nodeOrBrowser must be 'node' or 'browser': ${node_or_browser}`,
`Invalid value for nodeOrBrowser: ${node_or_browser}. Expected 'node' or 'browser'`,
);
}
this.node_or_browser = node_or_browser;
Expand Down

0 comments on commit dedd3b4

Please sign in to comment.