src/utils.js
/**
 * Asserts a named components arguments are correct. This function will throw
 * a MissingContextError or BadArgumentError error.
 * assertComponentArguments(ctx: Any, initialState: Any) -> void
 */
Asserts a named components arguments are correct. This function will throw
a MissingContextError or BadArgumentError error.
assertComponentArguments(ctx: Any, initialState: Any) -> void
Asserts a named components arguments are correct . This function will throw a MissingContextError or BadArgumentError error . assertComponentArguments ( ctx : Any initialState : Any ) - > void
function assertComponentArguments(label, ctx, initialState) {
  if (undefined === ctx) {
    throw new MissingContextError(label)
  } else if (null === ctx || 'object' != typeof ctx || Array.isArray(ctx)) {
    throw new BadArgumentError(0, 'ctx', ctx, 'object')
  } else if (initialState && 'object' != typeof initialState) {
    throw new BadArgumentError(1, 'initialState', initialState, 'object')
  }
}
function assertComponentArguments ( label , ctx , initialState ) { if ( undefined === ctx ) { throw new MissingContextError ( label ) } else if ( null === ctx || 'object' != typeof ctx || Array . isArray ( ctx ) ) { throw new BadArgumentError ( 0 , 'ctx' , ctx , 'object' ) } else if ( initialState && 'object' != typeof initialState ) { throw new BadArgumentError ( 1 , 'initialState' , initialState , 'object' ) } }
Asserts a named components arguments are correct.
Asserts a named components arguments are correct .