objects.mjs 437 B

123456789101112131415161718
  1. import { get, set } from 'lodash-unified';
  2. export { hasOwn } from '@vue/shared';
  3. const keysOf = (arr) => Object.keys(arr);
  4. const entriesOf = (arr) => Object.entries(arr);
  5. const getProp = (obj, path, defaultValue) => {
  6. return {
  7. get value() {
  8. return get(obj, path, defaultValue);
  9. },
  10. set value(val) {
  11. set(obj, path, val);
  12. }
  13. };
  14. };
  15. export { entriesOf, getProp, keysOf };
  16. //# sourceMappingURL=objects.mjs.map