Skip to content

Commit

Permalink
add spelling normalise as an alias for normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
bkw committed Apr 16, 2015
1 parent 166f8c7 commit 424f07a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ This is a linear operation. If the input image is in a non-linear colour space s

The output image will still be web-friendly sRGB and contain three (identical) channels.

#### normalize()
#### normalize() / normalise()

Stretch histogram to cover full dynamic range before output to enhance contrast.

Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ Sharp.prototype.normalize = function(normalize) {
this.options.normalize = (typeof normalize === 'boolean') ? normalize : true;
return this;
};
Sharp.prototype.normalise = Sharp.prototype.normalize;

/*
Convert to greyscale
Expand Down
4 changes: 4 additions & 0 deletions test/unit/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ describe('Normalization', function () {
return done();
});
});

it('uses the same prototype for both spellings', function () {
assert.strictEqual(sharp.prototype.normalize, sharp.prototype.normalise);
});
});

0 comments on commit 424f07a

Please sign in to comment.