MCPcopy Index your code
hub / github.com/formatjs/formatjs / isValidGranularity

Function isValidGranularity

packages/intl-segmenter/scripts/debug.ts:15–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13const beforeLastArg = process.argv[process.argv.length - 2]
14
15const isValidGranularity = i => ['word', 'sentence', 'grapheme'].includes(i)
16let granularity = 'grapheme'
17let range = undefined
18if (isValidGranularity(lastArg)) {

Callers 1

debug.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected