Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/modules / ___dist / chain-able / src / deps / is / async.js
Size: Mime:
"use strict";

const toS = require("./toS");
/**
 * @category Lang
 *
 * @param  {*} x value
 * @return {boolean} isAsync
 * @since 4.0.0-beta.2
 *
 * @memberOf is
 * @func isAsync
 * @see is/toS
 * @see is/promise
 *
 * @example
 *
 *  isAsync(async function() {})
 *  //=> true
 *  isAsync(new Promise(r => r()))
 *  //=> false
 *  isAsync({})
 *  //=> false
 *  isAsync(function() {})
 */


module.exports = function isAsync(x) {
  return toS(x) === '[object AsyncFunction]';
};