import { at } from 'lodash' ; import { NodeToken } from './types' ; export default function makeToken ( json ) { const [ id , expiry ] = at ( json , [ 'id' , 'expiry' ] ) ; return { id , expiry : new Date ( expiry ) , } ; }