aboutsummaryrefslogtreecommitdiff
path: root/node_modules/stylus/lib/functions/remove.js
blob: d8e157aa03fb166d7a37ff8a672b79e5e99ca18d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var utils = require('../utils');

/**
 * Remove the given `key` from the `object`.
 *
 * @param {Object} object
 * @param {String} key
 * @return {Object}
 * @api public
 */

module.exports = function remove(object, key){
  utils.assertType(object, 'object', 'object');
  utils.assertString(key, 'key');
  delete object.vals[key.string];
  return object;
};