open-nomad/ui/app/helpers/format-id.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
233 B
JavaScript
Raw Normal View History

import Helper from '@ember/component/helper';
export function formatID([model, relationship]) {
const id = model.belongsTo(relationship).id();
return { id, shortId: id.split('-')[0] };
}
export default Helper.helper(formatID);