MCPcopy
hub / github.com/umijs/babel-plugin-import / transCamel

Function transCamel

src/Plugin.js:4–10  ·  view source on GitHub ↗
(_str, symbol)

Source from the content-addressed store, hash-verified

2import { addSideEffect, addDefault, addNamed } from '@babel/helper-module-imports';
3
4function transCamel(_str, symbol) {
5 // e.g. QRCode
6 // First match: QR
7 // Second match: Code
8 const cells = _str.match(/([A-Z]+(?=[A-Z]|$))|([A-Z]?[^A-Z]+)/g) || [];
9 return cells.map(c => c.toLowerCase()).join(symbol);
10}
11
12function winPath(path) {
13 return path.replace(/\\/g, '/');

Callers 1

importMethodMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…