This repository was archived by the owner on Mar 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,12 @@ function toCamelCase(aString) {
147
147
var tokens = aString . split ( " " ) ;
148
148
149
149
var camelString = "" ;
150
- tokens . map ( function ( token ) {
151
- camelString += token [ 0 ] . toUpperCase ( ) ;
150
+ tokens . map ( function ( token , index ) {
151
+ if ( index ) {
152
+ camelString += token [ 0 ] ; // Keep the first letter of the first word as it is
153
+ } else {
154
+ camelString += token [ 0 ] . toUpperCase ( ) ; // Capitalize the first letter of other words
155
+ }
152
156
camelString += token . substring ( 1 , token . length ) ;
153
157
return true ;
154
158
} ) ;
Original file line number Diff line number Diff line change @@ -82,10 +82,10 @@ function initComponent(options) {
82
82
* or where we might initialise a component written from scratch. Needs to be
83
83
* paired with a `define` method call - see end of the page.
84
84
**/
85
- export const BiojsComponent < %= toolNameCamel % > = {
85
+ export const < %= toolNameCamel % > = {
86
86
init : initComponent ( )
87
87
} ;
88
88
89
89
// this line connects the html element in idex.html with the javascript
90
90
// defined above.
91
- define ( '<%=toolNameComputer%>' , BiojsComponent < %= toolNameCamel % > ) ;
91
+ define ( '<%=toolNameComputer%>' , < %= toolNameCamel % > );
You can’t perform that action at this time.
0 commit comments