import { join } from 'path' ; import { categories } from './categories' ; import { directories } from './directories' ; import { get } from './get' ; param name param dir return export function files ( name , dir = directories . sanitized ) { return categories [ name ] . map ( ( file ) => join ( dir , `${ file }.json` ) ) ; } param name param dir return export function category ( name , dir = directories . sanitized ) { return get ( files ( name , dir ) ) ; }