mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
2.2 KiB
JSON
1 line
2.2 KiB
JSON
|
{"ast":null,"code":"'use strict';\n\nvar createError = require('./createError');\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\n\n\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));\n }\n};","map":{"version":3,"sources":["/app/node_modules/axios/lib/core/settle.js"],"names":["createError","require","module","exports","settle","resolve","reject","response","validateStatus","config","status","request"],"mappings":"AAAA;;AAEA,IAAIA,WAAW,GAAGC,OAAO,CAAC,eAAD,CAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACAC,MAAM,CAACC,OAAP,GAAiB,SAASC,MAAT,CAAgBC,OAAhB,EAAyBC,MAAzB,EAAiCC,QAAjC,EAA2C;AAC1D,MAAIC,cAAc,GAAGD,QAAQ,CAACE,MAAT,CAAgBD,cAArC;;AACA,MAAI,CAACD,QAAQ,CAACG,MAAV,IAAoB,CAACF,cAArB,IAAuCA,cAAc,CAACD,QAAQ,CAACG,MAAV,CAAzD,EAA4E;AAC1EL,IAAAA,OAAO,CAACE,QAAD,CAAP;AACD,GAFD,MAEO;AACLD,IAAAA,MAAM,CAACN,WAAW,CAChB,qCAAqCO,QAAQ,CAACG,MAD9B,EAEhBH,QAAQ,CAACE,MAFO,EAGhB,IAHgB,EAIhBF,QAAQ,CAACI,OAJO,EAKhBJ,QALgB,CAAZ,CAAN;AAOD;AACF,CAbD","sourcesContent":["'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n"]},"metadata":{},"sourceType":"script"}
|