File tree 2 files changed +2
-8
lines changed
2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -263,10 +263,7 @@ module.exports = {
263
263
* @param {string } the identifier to strip
264
264
*/
265
265
function stripQuotes ( string ) {
266
- if ( string [ 0 ] === '\'' || string [ 0 ] === '"' && string [ 0 ] === string [ string . length - 1 ] ) {
267
- return string . slice ( 1 , string . length - 1 ) ;
268
- }
269
- return string ;
266
+ return string . replace ( / ^ \' | \' $ / g, '' ) ;
270
267
}
271
268
272
269
/**
Original file line number Diff line number Diff line change @@ -333,10 +333,7 @@ module.exports = {
333
333
* @param {string } the identifier to strip
334
334
*/
335
335
function stripQuotes ( string ) {
336
- if ( string [ 0 ] === '\'' || string [ 0 ] === '"' && string [ 0 ] === string [ string . length - 1 ] ) {
337
- return string . slice ( 1 , string . length - 1 ) ;
338
- }
339
- return string ;
336
+ return string . replace ( / ^ \' | \' $ / g, '' ) ;
340
337
}
341
338
342
339
/**
You can’t perform that action at this time.
0 commit comments