]> gerrit.simantics Code Review - simantics/district.git/blob - es5-ext/object/first-key.js
Hide "enabled" column for non-component type tech type tables
[simantics/district.git] / es5-ext / object / first-key.js
1 'use strict';
2
3 var value = require('./valid-value')
4
5   , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
6
7 module.exports = function (obj) {
8         var i;
9         value(obj);
10         for (i in obj) {
11                 if (propertyIsEnumerable.call(obj, i)) return i;
12         }
13         return null;
14 };