- Add serve.py to resolve clean Quartz URLs to .html files - Regenerate Quartz site with correct baseUrl http://100.118.5.51:9120 - 196 HTML files emitted; all internal links now resolve
13 lines
386 B
JavaScript
13 lines
386 B
JavaScript
import cb from './_cb.js';
|
|
import keys from './keys.js';
|
|
|
|
// Returns the first key on an object that passes a truth test.
|
|
export default function findKey(obj, predicate, context) {
|
|
predicate = cb(predicate, context);
|
|
var _keys = keys(obj), key;
|
|
for (var i = 0, length = _keys.length; i < length; i++) {
|
|
key = _keys[i];
|
|
if (predicate(obj[key], key, obj)) return key;
|
|
}
|
|
}
|