source: frontend/node_modules/unquote/index.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 259 bytes
Line 
1var reg = /[\'\"]/
2
3module.exports = function unquote(str) {
4 if (!str) {
5 return ''
6 }
7 if (reg.test(str.charAt(0))) {
8 str = str.substr(1)
9 }
10 if (reg.test(str.charAt(str.length - 1))) {
11 str = str.substr(0, str.length - 1)
12 }
13 return str
14}
Note: See TracBrowser for help on using the repository browser.