e2591689f18260de4e2d13885961094a.json
5.08 KB
{"ast":null,"code":"'use strict';\n\nvar $ = require('../internals/export');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar NativePromise = require('../internals/native-promise-constructor');\n\nvar fails = require('../internals/fails');\n\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar promiseResolve = require('../internals/promise-resolve');\n\nvar redefine = require('../internals/redefine'); // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\n\n\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({\n then: function () {\n /* empty */\n }\n }, function () {\n /* empty */\n });\n}); // `Promise.prototype.finally` method\n// https://tc39.github.io/ecma262/#sec-promise.prototype.finally\n\n$({\n target: 'Promise',\n proto: true,\n real: true,\n forced: NON_GENERIC\n}, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = typeof onFinally == 'function';\n return this.then(isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () {\n return x;\n });\n } : onFinally, isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () {\n throw e;\n });\n } : onFinally);\n }\n}); // patch native Promise.prototype for native async functions\n\nif (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {\n redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/core-js-pure/modules/es.promise.finally.js"],"names":["$","require","IS_PURE","NativePromise","fails","getBuiltIn","speciesConstructor","promiseResolve","redefine","NON_GENERIC","prototype","call","then","target","proto","real","forced","onFinally","C","isFunction","x","e"],"mappings":"AAAA;;AACA,IAAIA,CAAC,GAAGC,OAAO,CAAC,qBAAD,CAAf;;AACA,IAAIC,OAAO,GAAGD,OAAO,CAAC,sBAAD,CAArB;;AACA,IAAIE,aAAa,GAAGF,OAAO,CAAC,yCAAD,CAA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S,CAAN;AAAU,OAA5D,CAAP;AACD,KAFS,GAENJ,SANC,CAAP;AAQD;AAZoE,CAAtE,CAAD,C,CAeA;;AACA,IAAI,CAACf,OAAD,IAAY,OAAOC,aAAP,IAAwB,UAApC,IAAkD,CAACA,aAAa,CAACO,SAAd,CAAwB,SAAxB,CAAvD,EAA2F;AACzFF,EAAAA,QAAQ,CAACL,aAAa,CAACO,SAAf,EAA0B,SAA1B,EAAqCL,UAAU,CAAC,SAAD,CAAV,CAAsBK,SAAtB,CAAgC,SAAhC,CAArC,CAAR;AACD","sourcesContent":["'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar redefine = require('../internals/redefine');\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.github.io/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// patch native Promise.prototype for native async functions\nif (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {\n redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);\n}\n"]},"metadata":{},"sourceType":"script"}