@jimp/plugin-threshold 0.20.2 → 0.21.0--canary.1149.a81f653.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,10 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = void 0;
7
-
6
+ exports.default = void 0;
8
7
  var _utils = require("@jimp/utils");
9
-
10
8
  /**
11
9
  * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default
12
10
  * @param {number} options object
@@ -16,52 +14,39 @@ var _utils = require("@jimp/utils");
16
14
  * @param {number} cb (optional) a callback for when complete
17
15
  * @return {this} this for chaining of methods
18
16
  */
19
- var _default = function _default() {
20
- return {
21
- threshold: function threshold(_ref, cb) {
22
- var _this = this;
23
-
24
- var max = _ref.max,
25
- _ref$replace = _ref.replace,
26
- replace = _ref$replace === void 0 ? 255 : _ref$replace,
27
- _ref$autoGreyscale = _ref.autoGreyscale,
28
- autoGreyscale = _ref$autoGreyscale === void 0 ? true : _ref$autoGreyscale;
29
-
30
- if (typeof max !== "number") {
31
- return _utils.throwError.call(this, "max must be a number", cb);
32
- }
33
-
34
- if (typeof replace !== "number") {
35
- return _utils.throwError.call(this, "replace must be a number", cb);
36
- }
37
-
38
- if (typeof autoGreyscale !== "boolean") {
39
- return _utils.throwError.call(this, "autoGreyscale must be a boolean", cb);
40
- }
41
-
42
- max = this.constructor.limit255(max);
43
- replace = this.constructor.limit255(replace);
44
-
45
- if (autoGreyscale) {
46
- this.greyscale();
47
- }
48
-
49
- this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
50
- var grey = _this.bitmap.data[idx] < max ? _this.bitmap.data[idx] : replace;
51
- _this.bitmap.data[idx] = grey;
52
- _this.bitmap.data[idx + 1] = grey;
53
- _this.bitmap.data[idx + 2] = grey;
54
- });
55
-
56
- if ((0, _utils.isNodePattern)(cb)) {
57
- cb.call(this, null, this);
58
- }
59
-
60
- return this;
17
+ var _default = () => ({
18
+ threshold(_ref, cb) {
19
+ let {
20
+ max,
21
+ replace = 255,
22
+ autoGreyscale = true
23
+ } = _ref;
24
+ if (typeof max !== "number") {
25
+ return _utils.throwError.call(this, "max must be a number", cb);
61
26
  }
62
- };
63
- };
64
-
65
- exports["default"] = _default;
27
+ if (typeof replace !== "number") {
28
+ return _utils.throwError.call(this, "replace must be a number", cb);
29
+ }
30
+ if (typeof autoGreyscale !== "boolean") {
31
+ return _utils.throwError.call(this, "autoGreyscale must be a boolean", cb);
32
+ }
33
+ max = this.constructor.limit255(max);
34
+ replace = this.constructor.limit255(replace);
35
+ if (autoGreyscale) {
36
+ this.greyscale();
37
+ }
38
+ this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {
39
+ const grey = this.bitmap.data[idx] < max ? this.bitmap.data[idx] : replace;
40
+ this.bitmap.data[idx] = grey;
41
+ this.bitmap.data[idx + 1] = grey;
42
+ this.bitmap.data[idx + 2] = grey;
43
+ });
44
+ if ((0, _utils.isNodePattern)(cb)) {
45
+ cb.call(this, null, this);
46
+ }
47
+ return this;
48
+ }
49
+ });
50
+ exports.default = _default;
66
51
  module.exports = exports.default;
67
52
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["threshold","cb","max","replace","autoGreyscale","throwError","call","constructor","limit255","greyscale","scanQuiet","bitmap","width","height","x","y","idx","grey","data"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;;eASe;AAAA,SAAO;AACpBA,IAAAA,SADoB,2BACoCC,EADpC,EACwC;AAAA;;AAAA,UAAhDC,GAAgD,QAAhDA,GAAgD;AAAA,8BAA3CC,OAA2C;AAAA,UAA3CA,OAA2C,6BAAjC,GAAiC;AAAA,oCAA5BC,aAA4B;AAAA,UAA5BA,aAA4B,mCAAZ,IAAY;;AAC1D,UAAI,OAAOF,GAAP,KAAe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IAAH,CAAQ,IAAR,EAAc,IAAd,EAAoB,IAApB;AACD;;AAED,aAAO,IAAP;AACD;AAnCmB,GAAP;AAAA,C","sourcesContent":["import { isNodePattern, throwError } from \"@jimp/utils\";\n\n/**\n * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default\n * @param {number} options object\n * max: A number auto limited between 0 - 255\n * replace: (optional) A number auto limited between 0 - 255 (default 255)\n * autoGreyscale: (optional) A boolean whether to apply greyscale beforehand (default true)\n * @param {number} cb (optional) a callback for when complete\n * @return {this} this for chaining of methods\n */\nexport default () => ({\n threshold({ max, replace = 255, autoGreyscale = true }, cb) {\n if (typeof max !== \"number\") {\n return throwError.call(this, \"max must be a number\", cb);\n }\n\n if (typeof replace !== \"number\") {\n return throwError.call(this, \"replace must be a number\", cb);\n }\n\n if (typeof autoGreyscale !== \"boolean\") {\n return throwError.call(this, \"autoGreyscale must be a boolean\", cb);\n }\n\n max = this.constructor.limit255(max);\n replace = this.constructor.limit255(replace);\n\n if (autoGreyscale) {\n this.greyscale();\n }\n\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {\n const grey =\n this.bitmap.data[idx] < max ? this.bitmap.data[idx] : replace;\n\n this.bitmap.data[idx] = grey;\n this.bitmap.data[idx + 1] = grey;\n this.bitmap.data[idx + 2] = grey;\n });\n\n if (isNodePattern(cb)) {\n cb.call(this, null, this);\n }\n\n return this;\n },\n});\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["threshold","cb","max","replace","autoGreyscale","throwError","call","constructor","limit255","greyscale","scanQuiet","bitmap","width","height","x","y","idx","grey","data","isNodePattern"],"sources":["../src/index.js"],"sourcesContent":["import { isNodePattern, throwError } from \"@jimp/utils\";\n\n/**\n * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default\n * @param {number} options object\n * max: A number auto limited between 0 - 255\n * replace: (optional) A number auto limited between 0 - 255 (default 255)\n * autoGreyscale: (optional) A boolean whether to apply greyscale beforehand (default true)\n * @param {number} cb (optional) a callback for when complete\n * @return {this} this for chaining of methods\n */\nexport default () => ({\n threshold({ max, replace = 255, autoGreyscale = true }, cb) {\n if (typeof max !== \"number\") {\n return throwError.call(this, \"max must be a number\", cb);\n }\n\n if (typeof replace !== \"number\") {\n return throwError.call(this, \"replace must be a number\", cb);\n }\n\n if (typeof autoGreyscale !== \"boolean\") {\n return throwError.call(this, \"autoGreyscale must be a boolean\", cb);\n }\n\n max = this.constructor.limit255(max);\n replace = this.constructor.limit255(replace);\n\n if (autoGreyscale) {\n this.greyscale();\n }\n\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {\n const grey =\n this.bitmap.data[idx] < max ? this.bitmap.data[idx] : replace;\n\n this.bitmap.data[idx] = grey;\n this.bitmap.data[idx + 1] = grey;\n this.bitmap.data[idx + 2] = grey;\n });\n\n if (isNodePattern(cb)) {\n cb.call(this, null, this);\n }\n\n return this;\n },\n});\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,eASe,OAAO;EACpBA,SAAS,OAA+CC,EAAE,EAAE;IAAA,IAAlD;MAAEC,GAAG;MAAEC,OAAO,GAAG,GAAG;MAAEC,aAAa,GAAG;IAAK,CAAC;IACpD,IAAI,OAAOF,GAAG,KAAK,QAAQ,EAAE;MAC3B,OAAOG,iBAAU,CAACC,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAEL,EAAE,CAAC;IAC1D;IAEA,IAAI,OAAOE,OAAO,KAAK,QAAQ,EAAE;MAC/B,OAAOE,iBAAU,CAACC,IAAI,CAAC,IAAI,EAAE,0BAA0B,EAAEL,EAAE,CAAC;IAC9D;IAEA,IAAI,OAAOG,aAAa,KAAK,SAAS,EAAE;MACtC,OAAOC,iBAAU,CAACC,IAAI,CAAC,IAAI,EAAE,iCAAiC,EAAEL,EAAE,CAAC;IACrE;IAEAC,GAAG,GAAG,IAAI,CAACK,WAAW,CAACC,QAAQ,CAACN,GAAG,CAAC;IACpCC,OAAO,GAAG,IAAI,CAACI,WAAW,CAACC,QAAQ,CAACL,OAAO,CAAC;IAE5C,IAAIC,aAAa,EAAE;MACjB,IAAI,CAACK,SAAS,EAAE;IAClB;IAEA,IAAI,CAACC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAACC,MAAM,CAACC,KAAK,EAAE,IAAI,CAACD,MAAM,CAACE,MAAM,EAAE,CAACC,CAAC,EAAEC,CAAC,EAAEC,GAAG,KAAK;MACzE,MAAMC,IAAI,GACR,IAAI,CAACN,MAAM,CAACO,IAAI,CAACF,GAAG,CAAC,GAAGd,GAAG,GAAG,IAAI,CAACS,MAAM,CAACO,IAAI,CAACF,GAAG,CAAC,GAAGb,OAAO;MAE/D,IAAI,CAACQ,MAAM,CAACO,IAAI,CAACF,GAAG,CAAC,GAAGC,IAAI;MAC5B,IAAI,CAACN,MAAM,CAACO,IAAI,CAACF,GAAG,GAAG,CAAC,CAAC,GAAGC,IAAI;MAChC,IAAI,CAACN,MAAM,CAACO,IAAI,CAACF,GAAG,GAAG,CAAC,CAAC,GAAGC,IAAI;IAClC,CAAC,CAAC;IAEF,IAAI,IAAAE,oBAAa,EAAClB,EAAE,CAAC,EAAE;MACrBA,EAAE,CAACK,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAC3B;IAEA,OAAO,IAAI;EACb;AACF,CAAC,CAAC;AAAA;AAAA"}
package/es/index.js CHANGED
@@ -1,11 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _utils = require("@jimp/utils");
1
+ import { isNodePattern, throwError } from "@jimp/utils";
9
2
 
10
3
  /**
11
4
  * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default
@@ -16,51 +9,37 @@ var _utils = require("@jimp/utils");
16
9
  * @param {number} cb (optional) a callback for when complete
17
10
  * @return {this} this for chaining of methods
18
11
  */
19
- var _default = function _default() {
20
- return {
21
- threshold: function threshold(_ref, cb) {
22
- var _this = this;
23
-
24
- var max = _ref.max,
25
- _ref$replace = _ref.replace,
26
- replace = _ref$replace === void 0 ? 255 : _ref$replace,
27
- _ref$autoGreyscale = _ref.autoGreyscale,
28
- autoGreyscale = _ref$autoGreyscale === void 0 ? true : _ref$autoGreyscale;
29
-
30
- if (typeof max !== "number") {
31
- return _utils.throwError.call(this, "max must be a number", cb);
32
- }
33
-
34
- if (typeof replace !== "number") {
35
- return _utils.throwError.call(this, "replace must be a number", cb);
36
- }
37
-
38
- if (typeof autoGreyscale !== "boolean") {
39
- return _utils.throwError.call(this, "autoGreyscale must be a boolean", cb);
40
- }
41
-
42
- max = this.constructor.limit255(max);
43
- replace = this.constructor.limit255(replace);
44
-
45
- if (autoGreyscale) {
46
- this.greyscale();
47
- }
48
-
49
- this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
50
- var grey = _this.bitmap.data[idx] < max ? _this.bitmap.data[idx] : replace;
51
- _this.bitmap.data[idx] = grey;
52
- _this.bitmap.data[idx + 1] = grey;
53
- _this.bitmap.data[idx + 2] = grey;
54
- });
55
-
56
- if ((0, _utils.isNodePattern)(cb)) {
57
- cb.call(this, null, this);
58
- }
59
-
60
- return this;
12
+ export default (() => ({
13
+ threshold(_ref, cb) {
14
+ let {
15
+ max,
16
+ replace = 255,
17
+ autoGreyscale = true
18
+ } = _ref;
19
+ if (typeof max !== "number") {
20
+ return throwError.call(this, "max must be a number", cb);
61
21
  }
62
- };
63
- };
64
-
65
- exports["default"] = _default;
22
+ if (typeof replace !== "number") {
23
+ return throwError.call(this, "replace must be a number", cb);
24
+ }
25
+ if (typeof autoGreyscale !== "boolean") {
26
+ return throwError.call(this, "autoGreyscale must be a boolean", cb);
27
+ }
28
+ max = this.constructor.limit255(max);
29
+ replace = this.constructor.limit255(replace);
30
+ if (autoGreyscale) {
31
+ this.greyscale();
32
+ }
33
+ this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {
34
+ const grey = this.bitmap.data[idx] < max ? this.bitmap.data[idx] : replace;
35
+ this.bitmap.data[idx] = grey;
36
+ this.bitmap.data[idx + 1] = grey;
37
+ this.bitmap.data[idx + 2] = grey;
38
+ });
39
+ if (isNodePattern(cb)) {
40
+ cb.call(this, null, this);
41
+ }
42
+ return this;
43
+ }
44
+ }));
66
45
  //# sourceMappingURL=index.js.map
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["threshold","cb","max","replace","autoGreyscale","throwError","call","constructor","limit255","greyscale","scanQuiet","bitmap","width","height","x","y","idx","grey","data"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;;eASe;AAAA,SAAO;AACpBA,IAAAA,SADoB,2BACoCC,EADpC,EACwC;AAAA;;AAAA,UAAhDC,GAAgD,QAAhDA,GAAgD;AAAA,8BAA3CC,OAA2C;AAAA,UAA3CA,OAA2C,6BAAjC,GAAiC;AAAA,oCAA5BC,aAA4B;AAAA,UAA5BA,aAA4B,mCAAZ,IAAY;;AAC1D,UAAI,OAAOF,GAAP,KAAe,QAAnB,EAA6B;AAC3B,eAAOG,kBAAWC,IAAX,CAAgB,IAAhB,EAAsB,sBAAtB,EAA8CL,EAA9C,CAAP;AACD;;AAED,UAAI,OAAOE,OAAP,KAAmB,QAAvB,EAAiC;AAC/B,eAAOE,kBAAWC,IAAX,CAAgB,IAAhB,EAAsB,0BAAtB,EAAkDL,EAAlD,CAAP;AACD;;AAED,UAAI,OAAOG,aAAP,KAAyB,SAA7B,EAAwC;AACtC,eAAOC,kBAAWC,IAAX,CAAgB,IAAhB,EAAsB,iCAAtB,EAAyDL,EAAzD,CAAP;AACD;;AAEDC,MAAAA,GAAG,GAAG,KAAKK,WAAL,CAAiBC,QAAjB,CAA0BN,GAA1B,CAAN;AACAC,MAAAA,OAAO,GAAG,KAAKI,WAAL,CAAiBC,QAAjB,CAA0BL,OAA1B,CAAV;;AAEA,UAAIC,aAAJ,EAAmB;AACjB,aAAKK,SAAL;AACD;;AAED,WAAKC,SAAL,CAAe,CAAf,EAAkB,CAAlB,EAAqB,KAAKC,MAAL,CAAYC,KAAjC,EAAwC,KAAKD,MAAL,CAAYE,MAApD,EAA4D,UAACC,CAAD,EAAIC,CAAJ,EAAOC,GAAP,EAAe;AACzE,YAAMC,IAAI,GACR,KAAI,CAACN,MAAL,CAAYO,IAAZ,CAAiBF,GAAjB,IAAwBd,GAAxB,GAA8B,KAAI,CAACS,MAAL,CAAYO,IAAZ,CAAiBF,GAAjB,CAA9B,GAAsDb,OADxD;AAGA,QAAA,KAAI,CAACQ,MAAL,CAAYO,IAAZ,CAAiBF,GAAjB,IAAwBC,IAAxB;AACA,QAAA,KAAI,CAACN,MAAL,CAAYO,IAAZ,CAAiBF,GAAG,GAAG,CAAvB,IAA4BC,IAA5B;AACA,QAAA,KAAI,CAACN,MAAL,CAAYO,IAAZ,CAAiBF,GAAG,GAAG,CAAvB,IAA4BC,IAA5B;AACD,OAPD;;AASA,UAAI,0BAAchB,EAAd,CAAJ,EAAuB;AACrBA,QAAAA,EAAE,CAACK,IAAH,CAAQ,IAAR,EAAc,IAAd,EAAoB,IAApB;AACD;;AAED,aAAO,IAAP;AACD;AAnCmB,GAAP;AAAA,C","sourcesContent":["import { isNodePattern, throwError } from \"@jimp/utils\";\n\n/**\n * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default\n * @param {number} options object\n * max: A number auto limited between 0 - 255\n * replace: (optional) A number auto limited between 0 - 255 (default 255)\n * autoGreyscale: (optional) A boolean whether to apply greyscale beforehand (default true)\n * @param {number} cb (optional) a callback for when complete\n * @return {this} this for chaining of methods\n */\nexport default () => ({\n threshold({ max, replace = 255, autoGreyscale = true }, cb) {\n if (typeof max !== \"number\") {\n return throwError.call(this, \"max must be a number\", cb);\n }\n\n if (typeof replace !== \"number\") {\n return throwError.call(this, \"replace must be a number\", cb);\n }\n\n if (typeof autoGreyscale !== \"boolean\") {\n return throwError.call(this, \"autoGreyscale must be a boolean\", cb);\n }\n\n max = this.constructor.limit255(max);\n replace = this.constructor.limit255(replace);\n\n if (autoGreyscale) {\n this.greyscale();\n }\n\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {\n const grey =\n this.bitmap.data[idx] < max ? this.bitmap.data[idx] : replace;\n\n this.bitmap.data[idx] = grey;\n this.bitmap.data[idx + 1] = grey;\n this.bitmap.data[idx + 2] = grey;\n });\n\n if (isNodePattern(cb)) {\n cb.call(this, null, this);\n }\n\n return this;\n },\n});\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["isNodePattern","throwError","threshold","cb","max","replace","autoGreyscale","call","constructor","limit255","greyscale","scanQuiet","bitmap","width","height","x","y","idx","grey","data"],"sources":["../src/index.js"],"sourcesContent":["import { isNodePattern, throwError } from \"@jimp/utils\";\n\n/**\n * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default\n * @param {number} options object\n * max: A number auto limited between 0 - 255\n * replace: (optional) A number auto limited between 0 - 255 (default 255)\n * autoGreyscale: (optional) A boolean whether to apply greyscale beforehand (default true)\n * @param {number} cb (optional) a callback for when complete\n * @return {this} this for chaining of methods\n */\nexport default () => ({\n threshold({ max, replace = 255, autoGreyscale = true }, cb) {\n if (typeof max !== \"number\") {\n return throwError.call(this, \"max must be a number\", cb);\n }\n\n if (typeof replace !== \"number\") {\n return throwError.call(this, \"replace must be a number\", cb);\n }\n\n if (typeof autoGreyscale !== \"boolean\") {\n return throwError.call(this, \"autoGreyscale must be a boolean\", cb);\n }\n\n max = this.constructor.limit255(max);\n replace = this.constructor.limit255(replace);\n\n if (autoGreyscale) {\n this.greyscale();\n }\n\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {\n const grey =\n this.bitmap.data[idx] < max ? this.bitmap.data[idx] : replace;\n\n this.bitmap.data[idx] = grey;\n this.bitmap.data[idx + 1] = grey;\n this.bitmap.data[idx + 2] = grey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AACO,MAAM,CAACO,IAAI,CAACF,GAAG,CAAC,GAAGC,IAAI;MAC5B,IAAI,CAACN,MAAM,CAACO,IAAI,CAACF,GAAG,GAAG,CAAC,CAAC,GAAGC,IAAI;MAChC,IAAI,CAACN,MAAM,CAACO,IAAI,CAACF,GAAG,GAAG,CAAC,CAAC,GAAGC,IAAI;IAClC,CAAC,CAAC;IAEF,IAAIlB,aAAa,CAACG,EAAE,CAAC,EAAE;MACrBA,EAAE,CAACI,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAC3B;IAEA,OAAO,IAAI;EACb;AACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimp/plugin-threshold",
3
- "version": "0.20.2",
3
+ "version": "0.21.0--canary.1149.a81f653.0",
4
4
  "description": "Lightens an image.",
5
5
  "main": "dist/index.js",
6
6
  "module": "es/index.js",
@@ -21,8 +21,7 @@
21
21
  "author": "",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@babel/runtime": "^7.7.2",
25
- "@jimp/utils": "^0.20.2"
24
+ "@jimp/utils": "0.21.0--canary.1149.a81f653.0"
26
25
  },
27
26
  "peerDependencies": {
28
27
  "@jimp/custom": ">=0.3.5",
@@ -30,14 +29,14 @@
30
29
  "@jimp/plugin-resize": ">=0.8.0"
31
30
  },
32
31
  "devDependencies": {
33
- "@jimp/custom": "^0.20.2",
34
- "@jimp/jpeg": "^0.20.2",
35
- "@jimp/plugin-color": "^0.20.2",
36
- "@jimp/plugin-resize": "^0.20.2",
37
- "@jimp/test-utils": "^0.20.2"
32
+ "@jimp/custom": "0.21.0--canary.1149.a81f653.0",
33
+ "@jimp/jpeg": "0.21.0--canary.1149.a81f653.0",
34
+ "@jimp/plugin-color": "0.21.0--canary.1149.a81f653.0",
35
+ "@jimp/plugin-resize": "0.21.0--canary.1149.a81f653.0",
36
+ "@jimp/test-utils": "0.21.0--canary.1149.a81f653.0"
38
37
  },
39
38
  "publishConfig": {
40
39
  "access": "public"
41
40
  },
42
- "gitHead": "cebbdb72f889102a8e3c42b25ad3243b16e3a485"
41
+ "gitHead": "a81f65324f23e3a668e31b9420d7d8b8bf976a55"
43
42
  }