import Group from "../core/Group" ; import Vault from "../core/Vault" ; import { History } from "../types" ; const SHARE_COMMAND_EXP = /^\$[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\s/ ; export function mergeHistories ( initial , incoming ) { return [ ] ; } param movingGroup param targetGroup throws export function moveGroupBetweenVaults ( movingGroup , targetGroup ) { const targetVault = targetGroup instanceof Vault ? ( targetGroup as Vault ) : targetGroup . vault ; targetVault . format . cloneGroup ( movingGroup . _source , targetGroup instanceof Vault ? "0" : targetGroup . id ) ; movingGroup . delete ( true ) ; } param history returns export function prependSharePrefix ( history , shareID ) { return history . map ( line => ( SHARE_COMMAND_EXP . test ( line ) ? line : `$${ shareID } ${ line }` ) ) ; } param history returns export function removeSharePrefix ( history ) { return history . map ( line => ( SHARE_COMMAND_EXP . test ( line ) ? line . replace ( SHARE_COMMAND_EXP , "" ) : line ) ) ; }