@boost/commonFunctionsisModuleNameisModuleName CallableisModuleName(name: string): booleanReturns true if a string is a valid Node module package name, according to the rules defined in validate-npm-package-name. Will return false for native builtin modules, like fs, and for the old name format. import { isModuleName } from '@boost/common';isModuleName('boost'); // trueisModuleName('@boost/common'); // trueisModuleName('fs'); // false
Returns
true
if a string is a valid Node module package name, according to the rules defined in validate-npm-package-name. Willreturn
false for native builtin modules, likefs
, and for the old name format.