Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async_fn

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async_fn - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

build/async_fn.deprecated.js

26

build/async_fn.js

@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

root["AsyncFn"] = factory(root["jquery"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -67,3 +67,3 @@ /******/ // The module cache

$ = __webpack_require__(2);
$ = __webpack_require__(2).$;

@@ -142,3 +142,3 @@ module.exports = window.AsyncFn = (function() {

return AsyncFn;
})();

@@ -149,5 +149,23 @@

/* 2 */
/***/ function(module, exports, __webpack_require__) {
var jquery;
if (false) {
module.exports = {
$: window.$
};
} else {
jquery = __webpack_require__(3);
module.exports = {
$: jquery
};
}
/***/ },
/* 3 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;

@@ -154,0 +172,0 @@ /***/ }

2

build/async_fn.min.js

@@ -1,2 +0,2 @@

!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?exports.AsyncFn=e(require("jquery")):n.AsyncFn=e(n.jquery)}(this,function(n){return function(n){function e(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return n[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var t={};return e.m=n,e.c=t,e.p="",e(0)}([function(n,e,t){n.exports=t(1)},function(n,e,t){var r;r=t(2),n.exports=window.AsyncFn=function(){function n(n){this.dfd=new r.Deferred,this.fn=n}return n.prototype.done=function(n){if(this.callback=n,this.isCalled)return this.callback()},n.prototype.call=function(){if(!this.isCalled)return this.fn().always(function(n){return function(){if(n.isCalled=!0,n.dfd.resolve(),n.callback)return n.callback()}}(this))},n.addToCallQueue=function(e){var t;return t=new n(e),null!=this.currentFn?this.currentFn.done(function(){return t.call()}):t.call(),this.currentFn=t},n.setImmediate=function(){var n,e,t,r;return e={},r=e,n=Math.random(),t=function(t){var r;if(t.data.toString()===n.toString())return e=e.next,r=e.func,delete e.func,r()},window.addEventListener&&window.postMessage?(window.addEventListener("message",t,!1),function(e){return r=r.next={func:e},window.postMessage(n,"*")}):function(n){return setTimeout(n,0)}}(),n}()},function(e,t){e.exports=n}])});
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?exports.AsyncFn=e(require("jquery")):n.AsyncFn=e(n.jquery)}(this,function(n){return function(n){function e(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return n[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var t={};return e.m=n,e.c=t,e.p="",e(0)}([function(n,e,t){n.exports=t(1)},function(n,e,t){var r;r=t(2).$,n.exports=window.AsyncFn=function(){function n(n){this.dfd=new r.Deferred,this.fn=n}return n.prototype.done=function(n){if(this.callback=n,this.isCalled)return this.callback()},n.prototype.call=function(){if(!this.isCalled)return this.fn().always(function(n){return function(){if(n.isCalled=!0,n.dfd.resolve(),n.callback)return n.callback()}}(this))},n.addToCallQueue=function(e){var t;return t=new n(e),null!=this.currentFn?this.currentFn.done(function(){return t.call()}):t.call(),this.currentFn=t},n.setImmediate=function(){var n,e,t,r;return e={},r=e,n=Math.random(),t=function(t){var r;if(t.data.toString()===n.toString())return e=e.next,r=e.func,delete e.func,r()},window.addEventListener&&window.postMessage?(window.addEventListener("message",t,!1),function(e){return r=r.next={func:e},window.postMessage(n,"*")}):function(n){return setTimeout(n,0)}}(),n}()},function(n,e,t){var r;r=t(3),n.exports={$:r}},function(e,t){e.exports=n}])});
//# sourceMappingURL=async_fn.min.js.map
{
"name": "async_fn",
"version": "0.2.2",
"version": "0.2.3",
"author": "Sergey Shishkalov <sergeyshishkalov@gmail.com>",

@@ -44,3 +44,5 @@ "description": "One-method library for calling asynchronous functions one by one in a queue",

"scripts": {
"build": "env NODE_ENV=production webpack",
"build": "npm run build-new && npm run build-deprecated",
"build-new": "env NODE_ENV=production webpack",
"build-deprecated": "env NODE_ENV=production DEPRECATED_JQUERY=1 webpack",
"test": "karma start"

@@ -47,0 +49,0 @@ },

@@ -13,5 +13,12 @@ const path = require('path')

)
plugins.push(new webpack.DefinePlugin({
'process.env': {
DEPRECATED_JQUERY: process.env.DEPRECATED_JQUERY ? 'true' : 'false'
}
}))
externals.push('jquery')
}
const isDeprecated = process.env.DEPRECATED_JQUERY
module.exports = {

@@ -24,3 +31,3 @@ devtool: 'source-map',

path: path.resolve('./build'),
filename: '[name].min.js',
filename: isDeprecated ? '[name].deprecated.min.js' : '[name].min.js',
library: 'AsyncFn',

@@ -27,0 +34,0 @@ libraryTarget: 'umd'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc