Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
400 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var 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 |
|
---|
| 12 | function remove(object, key){
|
---|
| 13 | utils.assertType(object, 'object', 'object');
|
---|
| 14 | utils.assertString(key, 'key');
|
---|
| 15 | delete object.vals[key.string];
|
---|
| 16 | return object;
|
---|
| 17 | }
|
---|
| 18 | remove.params = ['object', 'key'];
|
---|
| 19 | module.exports = remove;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.