import { Nibbles } from '../trieNode' ; param key returns export function addHexPrefix ( key , terminator ) { if ( key . length % 2 ) { key . unshift ( 1 ) ; } else { key . unshift ( 0 ) ; key . unshift ( 0 ) ; } if ( terminator ) { key [ 0 ] += 2 ; } return key ; } param val private export function removeHexPrefix ( val ) { if ( val [ 0 ] % 2 ) { val = val . slice ( 1 ) ; } else { val = val . slice ( 2 ) ; } return val ; } param key private export function isTerminator ( key ) { return key [ 0 ] > 1 ; }