@polkadot/util
Advanced tools
Comparing version 10.1.5 to 10.1.6
@@ -16,11 +16,16 @@ "use strict"; | ||
function nextTick(onExec, onError) { | ||
Promise.resolve().then(() => { | ||
onExec(); | ||
}).catch(error => { | ||
if (onError) { | ||
onError(error); | ||
} else { | ||
console.error(error); | ||
} | ||
}); | ||
// While Promise.resolve().then(...) would defer to the nextTick, this | ||
// actually does not play as nicely in browsers like the setTimeout(...) | ||
// approach. So the safer, though less optimal approach is the one taken here | ||
setTimeout(() => { | ||
Promise.resolve().then(() => { | ||
onExec(); | ||
}).catch(error => { | ||
if (onError) { | ||
onError(error); | ||
} else { | ||
console.error(error); | ||
} | ||
}); | ||
}, 0); | ||
} |
@@ -14,4 +14,4 @@ "use strict"; | ||
type: 'cjs', | ||
version: '10.1.5' | ||
version: '10.1.6' | ||
}; | ||
exports.packageInfo = packageInfo; |
@@ -9,11 +9,16 @@ // Copyright 2017-2022 @polkadot/util authors & contributors | ||
export function nextTick(onExec, onError) { | ||
Promise.resolve().then(() => { | ||
onExec(); | ||
}).catch(error => { | ||
if (onError) { | ||
onError(error); | ||
} else { | ||
console.error(error); | ||
} | ||
}); | ||
// While Promise.resolve().then(...) would defer to the nextTick, this | ||
// actually does not play as nicely in browsers like the setTimeout(...) | ||
// approach. So the safer, though less optimal approach is the one taken here | ||
setTimeout(() => { | ||
Promise.resolve().then(() => { | ||
onExec(); | ||
}).catch(error => { | ||
if (onError) { | ||
onError(error); | ||
} else { | ||
console.error(error); | ||
} | ||
}); | ||
}, 0); | ||
} |
@@ -23,3 +23,3 @@ { | ||
"type": "module", | ||
"version": "10.1.5", | ||
"version": "10.1.6", | ||
"main": "./cjs/index.js", | ||
@@ -723,6 +723,6 @@ "module": "./index.js", | ||
"@babel/runtime": "^7.18.9", | ||
"@polkadot/x-bigint": "10.1.5", | ||
"@polkadot/x-global": "10.1.5", | ||
"@polkadot/x-textdecoder": "10.1.5", | ||
"@polkadot/x-textencoder": "10.1.5", | ||
"@polkadot/x-bigint": "10.1.6", | ||
"@polkadot/x-global": "10.1.6", | ||
"@polkadot/x-textdecoder": "10.1.6", | ||
"@polkadot/x-textencoder": "10.1.6", | ||
"@types/bn.js": "^5.1.0", | ||
@@ -729,0 +729,0 @@ "bn.js": "^5.2.1" |
@@ -8,3 +8,3 @@ // Copyright 2017-2022 @polkadot/util authors & contributors | ||
type: 'esm', | ||
version: '10.1.5' | ||
version: '10.1.6' | ||
}; |
Sorry, the diff of this file is too big to display
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
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
532970
15284
+ Added@polkadot/x-bigint@10.1.6(transitive)
+ Added@polkadot/x-global@10.1.6(transitive)
+ Added@polkadot/x-textdecoder@10.1.6(transitive)
+ Added@polkadot/x-textencoder@10.1.6(transitive)
- Removed@polkadot/x-bigint@10.1.5(transitive)
- Removed@polkadot/x-global@10.1.5(transitive)
- Removed@polkadot/x-textdecoder@10.1.5(transitive)
- Removed@polkadot/x-textencoder@10.1.5(transitive)
Updated@polkadot/x-bigint@10.1.6
Updated@polkadot/x-global@10.1.6