diff --git a/packages/gallery/src/interface/components/appbar.js b/packages/gallery/src/interface/components/appbar.js index f2229b8..664aa2f 100644 --- a/packages/gallery/src/interface/components/appbar.js +++ b/packages/gallery/src/interface/components/appbar.js @@ -1,8 +1,7 @@ -import { prop, computed, container } from 'frptools'; +import { prop, computed, container, pick } from 'frptools'; import { Icon } from './icon.js'; import { defineElement as el, subscribeToRender } from '../../utils/domvm.js'; -import { pick } from '../../utils/conversion.js'; import { injectStyle, styled } from '../../services/style.js'; import { CLICKABLE } from '../styles.js'; diff --git a/packages/gallery/src/utils/conversion.js b/packages/gallery/src/utils/conversion.js index 10a34e1..e5144f1 100644 --- a/packages/gallery/src/utils/conversion.js +++ b/packages/gallery/src/utils/conversion.js @@ -1,4 +1,6 @@ import { readAsArrayBuffer } from 'pouchdb-binary-utils'; +import { pick } from 'frptools'; + import { isObject } from './comparators'; export function bufferToHexString(buffer) { @@ -45,8 +47,6 @@ export function deepAssign(to, ...rest) { return to; } -export const pick = (id, def) => doc => (doc && doc.hasOwnProperty(id) ? doc[id] : def); - export const extractID = pick('_id'); export const extractREV = pick('_rev');