UNPKG

diffusion

Version:

Diffusion JavaScript client

19 lines (18 loc) 579 B
"use strict"; /** * @module Util */ Object.defineProperty(exports, "__esModule", { value: true }); exports.responseSuccess = void 0; /** * Type guard for responses from a {@link ServiceSender}. * * @param err the response error, if present * @param response the response data * @return returns `true` if the error is falsy. In this case, the {@link ServiceSender} should have called * the response callback with a valid response. */ function responseSuccess(err, response) { return !err; } exports.responseSuccess = responseSuccess;