UNPKG

extract-base-iterator

Version:

Base iterator for extract iterators like tar-iterator and zip-iterator

8 lines (7 loc) 294 B
export default function validateAttributes(attributes, keys) { let key; for(let index = 0; index < keys.length; index++){ key = keys[index]; if (attributes[key] === undefined) throw new Error(`Missing attribute ${key}.Attributes ${JSON.stringify(attributes)}`); } }