We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
gregberge
Learn more about funding links in repositories.
Report abuse
1 parent 70ae0a0 commit 5decc94Copy full SHA for 5decc94
packages/cli/src/util.js
@@ -62,9 +62,5 @@ export function formatExportName(name) {
62
return `Svg${name}`
63
}
64
65
- if (/[-]/g.test(name)) {
66
- return camelcase(name, { pascalCase: true })
67
- }
68
-
69
- return name
+ return camelcase(name, { pascalCase: true })
70
packages/cli/src/util.test.js
@@ -34,6 +34,7 @@ describe('util', () => {
34
35
describe('#formatExportName', () => {
36
it('should ensure a valid export name', () => {
37
+ expect(formatExportName('foo')).toBe('Foo')
38
expect(formatExportName('foo-bar')).toBe('FooBar')
39
expect(formatExportName('2foo')).toBe('Svg2foo')
40
expect(formatExportName('2foo-bar')).toBe('Svg2FooBar')
Successfully deployed to the following URLs:
1 commit comments
vercel[bot] commentedon Oct 30, 2021
Successfully deployed to the following URLs: