-
CommonJS
CommonJS module may not support all module.exports as named exports:
❌
import {sync} from "fast-glob"
✅
import fg from "fast-glob" fg.sync(...) // extract const {sync} = fg sync(...)
^(?:(?:@(?:[a-z0-9-*~][a-z0-9-*.*~]*)?/[a-z0-9-.*~])|[a-z0-9-~])[a-z0-9-.*~]*$
[@[groupname]/]<packagename>
start with @ or [a-z0-9-~]
groupname:
@ is followed by a group name in the form of @[groupname]/<packagename>
groupname can be empty or start with [a-z0-9-*~] later on [a-z0-9-*.*~]
packagename:
if there is a @ then packagename can start with [a-z0-9-.*~], otherwise packagename must start with [a-z0-9-~]
the later packagename can be [a-z0-9-.*~]