mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Update dev deps, deconstify all the functions, API doc refresh
This commit is contained in:
@@ -22,7 +22,7 @@ const sharp = require('../build/Release/sharp.node');
|
||||
* @param {Number} [options.items=100] - is the maximum number of operations to cache
|
||||
* @returns {Object}
|
||||
*/
|
||||
const cache = function cache (options) {
|
||||
function cache (options) {
|
||||
if (is.bool(options)) {
|
||||
if (options) {
|
||||
// Default cache settings of 50MB, 20 files, 100 items
|
||||
@@ -35,7 +35,7 @@ const cache = function cache (options) {
|
||||
} else {
|
||||
return sharp.cache();
|
||||
}
|
||||
};
|
||||
}
|
||||
cache(true);
|
||||
|
||||
/**
|
||||
@@ -57,9 +57,9 @@ cache(true);
|
||||
* @param {Number} [concurrency]
|
||||
* @returns {Number} concurrency
|
||||
*/
|
||||
const concurrency = function concurrency (concurrency) {
|
||||
function concurrency (concurrency) {
|
||||
return sharp.concurrency(is.integer(concurrency) ? concurrency : null);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides access to internal task counters.
|
||||
@@ -71,9 +71,9 @@ const concurrency = function concurrency (concurrency) {
|
||||
*
|
||||
* @returns {Object}
|
||||
*/
|
||||
const counters = function counters () {
|
||||
function counters () {
|
||||
return sharp.counters();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get and set use of SIMD vector unit instructions.
|
||||
@@ -95,9 +95,9 @@ const counters = function counters () {
|
||||
* @param {Boolean} [simd=false]
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
const simd = function simd (simd) {
|
||||
function simd (simd) {
|
||||
return sharp.simd(is.bool(simd) ? simd : null);
|
||||
};
|
||||
}
|
||||
simd(false);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user