Update dev deps, deconstify all the functions, API doc refresh

This commit is contained in:
Lovell Fuller
2017-03-31 21:42:20 +01:00
parent 4001c4a48a
commit 27fb864ac4
15 changed files with 128 additions and 125 deletions

View File

@@ -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);
/**