convert.js 330 B

1234567891011121314151617
  1. var utils = require('../utils');
  2. /**
  3. * Like `unquote` but tries to convert
  4. * the given `str` to a Stylus node.
  5. *
  6. * @param {String} str
  7. * @return {Node}
  8. * @api public
  9. */
  10. function convert(str){
  11. utils.assertString(str, 'str');
  12. return utils.parseString(str.string);
  13. };
  14. convert.params = ['str'];
  15. module.exports = convert;