From 9c64710c8b381015470d473b19e2ef1dcc671821 Mon Sep 17 00:00:00 2001 From: allx Date: Sat, 20 Feb 2021 17:39:25 +0200 Subject: [PATCH] Allow code bundling of utility functions (#2586) --- lib/utility.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/utility.js b/lib/utility.js index 1da7ae9b..9c9b4bc5 100644 --- a/lib/utility.js +++ b/lib/utility.js @@ -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;