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:
@@ -15,7 +15,7 @@ const min = 320;
|
||||
const max = 960;
|
||||
|
||||
const randomDimension = function () {
|
||||
return Math.ceil(Math.random() * (max - min) + min);
|
||||
return Math.ceil((Math.random() * (max - min)) + min);
|
||||
};
|
||||
|
||||
new Benchmark.Suite('random').add('imagemagick', {
|
||||
|
||||
4
test/fixtures/index.js
vendored
4
test/fixtures/index.js
vendored
@@ -25,8 +25,8 @@ const fingerprint = function (image, callback) {
|
||||
let fingerprint = '';
|
||||
for (let col = 0; col < 8; col++) {
|
||||
for (let row = 0; row < 8; row++) {
|
||||
const left = data[row * 8 + col];
|
||||
const right = data[row * 8 + col + 1];
|
||||
const left = data[(row * 8) + col];
|
||||
const right = data[(row * 8) + col + 1];
|
||||
fingerprint = fingerprint + (left < right ? '1' : '0');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1168,7 +1168,7 @@ describe('Input/output', function () {
|
||||
sharp(fixtures.inputJpg).metadata(function (err, metadata) {
|
||||
if (err) throw err;
|
||||
sharp(fixtures.inputJpg)
|
||||
.limitInputPixels(metadata.width * metadata.height - 1)
|
||||
.limitInputPixels((metadata.width * metadata.height) - 1)
|
||||
.toBuffer(function (err) {
|
||||
assert.strictEqual(true, !!err);
|
||||
done();
|
||||
|
||||
@@ -187,7 +187,7 @@ describe('Tile', function () {
|
||||
assert.strictEqual(2225, info.height);
|
||||
assert.strictEqual(3, info.channels);
|
||||
assert.strictEqual('undefined', typeof info.size);
|
||||
assertDeepZoomTiles(directory, 512 + 2 * 16, 13, done);
|
||||
assertDeepZoomTiles(directory, 512 + (2 * 16), 13, done);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user