src/promiseState.js
function create({
    pending = false, // eslint-disable-line no-shadow
    refreshing = false, // eslint-disable-line no-shadow
    fulfilled = false, // eslint-disable-line no-shadow
    rejected = false, // eslint-disable-line no-shadow
    value = null,
    reason = null,
}) {
    return {
        pending,
        refreshing,
        fulfilled,
        rejected,
        value,
        reason,
    };
}
function create({
    pending = false, // eslint-disable-line no-shadow
    refreshing = false, // eslint-disable-line no-shadow
    fulfilled = false, // eslint-disable-line no-shadow
    rejected = false, // eslint-disable-line no-shadow
    value = null,
    reason = null,
}) {
    return {
        pending,
        refreshing,
        fulfilled,
        rejected,
        value,
        reason,
    };
}
function create ( { pending = false , // eslint-disable-line no-shadow refreshing = false , // eslint-disable-line no-shadow fulfilled = false , // eslint-disable-line no-shadow rejected = false , // eslint-disable-line no-shadow value = null , reason = null , } ) { return { pending , refreshing , fulfilled , rejected , value , reason , } ; }
Constructor for creating a new promiseState.
@param [pending] {Boolean}
@param [refreshing] {Boolean}
@param [fulfilled] {Boolean}
@param [rejected] {Boolean}
@param [value] {*}
@param [reason] {*}
@returns {Object}
Constructor for creating a new promiseState .