Extract the relation value of a determinate array key list:
import { relation } from 'ava-ia/lib/helpers' const { location, when } = relation(['when', 'location'], state);
'use strict'; export default (keys, state) => { const relations = state.relations || {}; let found = {}; keys.filter(key => relations[key] ? found[key] = relations[key].text : null) return found; }
There was an error while loading. Please reload this page.
Feel free to offer new features, improvements or anything you can think of. This project makes sense with your participation and experience using Ava.