Blame view

node_modules/stylus/lib/functions/remove.js 358 Bytes
ce4c83ff   wxy   初始提交
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;
  };