source: trip-planner-front/node_modules/stylus/lib/functions/remove.js@ 6a3a178

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

initial commit

  • Property mode set to 100644
File size: 400 bytes
Line 
1var utils = require('../utils');
2
3/**
4 * Remove the given `key` from the `object`.
5 *
6 * @param {Object} object
7 * @param {String} key
8 * @return {Object}
9 * @api public
10 */
11
12function remove(object, key){
13 utils.assertType(object, 'object', 'object');
14 utils.assertString(key, 'key');
15 delete object.vals[key.string];
16 return object;
17}
18remove.params = ['object', 'key'];
19module.exports = remove;
Note: See TracBrowser for help on using the repository browser.