MCPcopy Index your code
hub / github.com/developit/microbundle / safeVariableName

Function safeVariableName

src/utils.js:41–45  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

39 * @param {string} name
40 */
41export function safeVariableName(name) {
42 const normalized = removeScope(name).toLowerCase();
43 const identifier = normalized.replace(INVALID_ES3_IDENT, '');
44 return camelCase(identifier);
45}
46
47export const EXTENSION = /(\.(umd|cjs|es|m))?\.([cm]?[tj]sx?)$/;

Callers 1

getNameFunction · 0.90

Calls 1

removeScopeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…