Object first key
yarn add @aegenet/belt-obj-first-key@^2.0.0
# or
npm i @aegenet/belt-obj-first-key@^2.0.0
import { objectFirstKey } from '@aegenet/belt-obj-first-key';
objectFirstKey(null); // null;
objectFirstKey(undefined); // null
objectFirstKey({}); // null
objectFirstKey({ id: 1 }); // 'id'
objectFirstKey({ id: 1, code: 'go' }); // 'id'
objectFirstKey({ _privateStuff: true, id: 1, code: 'go' }, key => !key.startsWith('_')); // 'id'