source: trip-planner-front/node_modules/stylus/lib/functions/lookup.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 393 bytes
Line 
1var utils = require('../utils')
2 , nodes = require('../nodes');
3
4/**
5 * Lookup variable `name` or return Null.
6 *
7 * @param {String} name
8 * @return {Mixed}
9 * @api public
10 */
11
12function lookup(name){
13 utils.assertType(name, 'string', 'name');
14 var node = this.lookup(name.val);
15 if (!node) return nodes.null;
16 return this.visit(node);
17}
18lookup.params = ['name'];
19module.exports = lookup;
Note: See TracBrowser for help on using the repository browser.