addon/src/create.js
Function buildObject
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildObject(node, blueprintKey, blueprint, defaultBuilder) {
let definition;
// Preserve plain arrays, prevent `Error: string values are not supported in page object definitions Key: "0"` error
if (Array.isArray(blueprint)) {
Function create
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function create(definition = {}, options = {}) {
if (typeof definition === 'string') {
throw new Error('Definition can not be a string');
}