File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -263,10 +263,7 @@ module.exports = {
263263 * @param {string } the identifier to strip
264264 */
265265 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, '' ) ;
270267 }
271268
272269 /**
Original file line number Diff line number Diff line change @@ -333,10 +333,7 @@ module.exports = {
333333 * @param {string } the identifier to strip
334334 */
335335 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, '' ) ;
340337 }
341338
342339 /**
You can’t perform that action at this time.
0 commit comments