src/loadAnimation.js
function createFromData(data, container) {
  if (data === undefined) {
    return Promise.resolve([])
  }

  if (!(isObject(data) || Array.isArray(data))) {
    return Promise.reject(new Error('Invalid animation data'))
  }
  return Promise.resolve(create(data, container))
}
function createFromData(data, container) {
  if (data === undefined) {
    return Promise.resolve([])
  }

  if (!(isObject(data) || Array.isArray(data))) {
    return Promise.reject(new Error('Invalid animation data'))
  }
  return Promise.resolve(create(data, container))
}
function createFromData ( data , container ) { if ( data === undefined ) { return Promise . resolve ( [ ] ) } if ( ! ( isObject ( data ) || Array . isArray ( data ) ) ) { return Promise . reject ( new Error ( 'Invalid animation data' ) ) } return Promise . resolve ( create ( data , container ) ) }
Create from data

@param {object|Array} data
@param {Element}      container
@return {Promise<Array|object>}
Create from data