module.exports = (library, brands, resolve) => { const { [library]: resolvedLibrary = library } = resolve const [b = null, ] = brands.filter(b => b.name.toLowerCase() === resolvedLibrary.toLowerCase()) if (b !== null) { return b } return null }