1 | var utils = require('../utils')
|
2 | , nodes = require('../nodes');
|
3 |
|
4 | /**
|
5 | * Unquote the given `string`.
|
6 | *
|
7 | * Examples:
|
8 | *
|
9 | * unquote("sans-serif")
|
10 | * // => sans-serif
|
11 | *
|
12 | * unquote(sans-serif)
|
13 | * // => sans-serif
|
14 | *
|
15 | * @param {String|Ident} string
|
16 | * @return {Literal}
|
17 | * @api public
|
18 | */
|
19 |
|
20 | function unquote(string){
|
21 | utils.assertString(string, 'string');
|
22 | return new nodes.Literal(string.string);
|
23 | }
|
24 | unquote.params = ['string'];
|
25 | module.exports = unquote;
|