UNPKG

@aws-amplify/auth

Version:
1 lines 791 B
{"version":3,"file":"inflightPromise.mjs","sources":["../../../../../../src/providers/cognito/utils/oauth/inflightPromise.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst inflightPromises = [];\nexport const addInflightPromise = (resolver) => {\n inflightPromises.push(resolver);\n};\nexport const resolveAndClearInflightPromises = () => {\n while (inflightPromises.length) {\n inflightPromises.pop()?.();\n }\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA,MAAM,gBAAgB,GAAG,EAAE;AACf,MAAC,kBAAkB,GAAG,CAAC,QAAQ,KAAK;AAChD,IAAI,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC;AACnC;AACY,MAAC,+BAA+B,GAAG,MAAM;AACrD,IAAI,OAAO,gBAAgB,CAAC,MAAM,EAAE;AACpC,QAAQ,gBAAgB,CAAC,GAAG,EAAE,IAAI;AAClC;AACA;;;;"}