Comparing version 0.2.2 to 0.2.3
@@ -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 @@ /***/ } |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41199
16
388
3