Allow code bundling of utility functions (#2586)

This commit is contained in:
allx 2021-02-20 17:39:25 +02:00 committed by GitHub
parent f6f16b91db
commit 9c64710c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,14 +157,10 @@ simd(true);
* @private
*/
module.exports = function (Sharp) {
[
cache,
concurrency,
counters,
simd
].forEach(function (f) {
Sharp[f.name] = f;
});
Sharp.cache = cache;
Sharp.concurrency = concurrency;
Sharp.counters = counters;
Sharp.simd = simd;
Sharp.format = format;
Sharp.interpolators = interpolators;
Sharp.versions = versions;