Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jimp/plugin-invert

Package Overview
Dependencies
Maintainers
2
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/plugin-invert - npm Package Compare versions

Comparing version 0.20.2 to 0.21.0--canary.1149.3239903.0

35

dist/index.js

@@ -6,6 +6,4 @@ "use strict";

});
exports["default"] = void 0;
exports.default = void 0;
var _utils = require("@jimp/utils");
/**

@@ -16,22 +14,17 @@ * Inverts the image

*/
var _default = function _default() {
return {
invert: function invert(cb) {
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
this.bitmap.data[idx] = 255 - this.bitmap.data[idx];
this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];
this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];
});
if ((0, _utils.isNodePattern)(cb)) {
cb.call(this, null, this);
}
return this;
var _default = () => ({
invert(cb) {
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
this.bitmap.data[idx] = 255 - this.bitmap.data[idx];
this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];
this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];
});
if ((0, _utils.isNodePattern)(cb)) {
cb.call(this, null, this);
}
};
};
exports["default"] = _default;
return this;
}
});
exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

39

es/index.js

@@ -1,10 +0,3 @@

"use strict";
import { isNodePattern } from "@jimp/utils";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _utils = require("@jimp/utils");
/**

@@ -15,21 +8,15 @@ * Inverts the image

*/
var _default = function _default() {
return {
invert: function invert(cb) {
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
this.bitmap.data[idx] = 255 - this.bitmap.data[idx];
this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];
this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];
});
if ((0, _utils.isNodePattern)(cb)) {
cb.call(this, null, this);
}
return this;
export default (() => ({
invert(cb) {
this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
this.bitmap.data[idx] = 255 - this.bitmap.data[idx];
this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];
this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];
});
if (isNodePattern(cb)) {
cb.call(this, null, this);
}
};
};
exports["default"] = _default;
return this;
}
}));
//# sourceMappingURL=index.js.map
{
"name": "@jimp/plugin-invert",
"version": "0.20.2",
"version": "0.21.0--canary.1149.3239903.0",
"description": "invert an image.",

@@ -21,4 +21,3 @@ "main": "dist/index.js",

"dependencies": {
"@babel/runtime": "^7.7.2",
"@jimp/utils": "^0.20.2"
"@jimp/utils": "0.21.0--canary.1149.3239903.0"
},

@@ -31,3 +30,3 @@ "peerDependencies": {

},
"gitHead": "cebbdb72f889102a8e3c42b25ad3243b16e3a485"
"gitHead": "323990352ce279d67297aed097b37bd8ec66ef51"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc