hexo/node_modules/stylus/lib/functions/remove.js

20 lines
400 B
JavaScript
Raw Normal View History

2023-09-25 15:58:56 +08:00
var utils = require('../utils');
/**
* Remove the given `key` from the `object`.
*
* @param {Object} object
* @param {String} key
* @return {Object}
* @api public
*/
function remove(object, key){
utils.assertType(object, 'object', 'object');
utils.assertString(key, 'key');
delete object.vals[key.string];
return object;
}
remove.params = ['object', 'key'];
module.exports = remove;