mirror of
https://github.com/pebble-dev/clay.git
synced 2026-10-28 23:48:17 -04:00
add eslint and clean up code
This commit is contained in:
1 parent
67d2258bb6
commit
cdb855edaa
51 files changed
+292
-2793
No files matched your search
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Batch update all the properties of an object.
|
||||
* @param {object} obj
|
||||
* @param {object} descriptor
|
||||
* @param {boolean} [descriptor.configurable]
|
||||
* @param {boolean} [descriptor.enumerable]
|
||||
* @param {*} [descriptor.value]
|
||||
* @param {boolean} [descriptor.writable]
|
||||
* @param {function} [descriptor.get]
|
||||
* @param {function} [descriptor.set]
|
||||
*/
|
||||
module.exports.updateProperties = function(obj, descriptor) {
|
||||
Object.getOwnPropertyNames(obj).forEach(function(prop) {
|
||||
Object.defineProperty(obj, prop, descriptor);
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user