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

@jimp/plugin-threshold

Package Overview
Dependencies
Maintainers
2
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/plugin-threshold - npm Package Compare versions

Comparing version 0.8.6-canary.815.488.0 to 0.8.6-canary.815.502.0

25

es/index.js

@@ -1,2 +0,10 @@

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

@@ -11,4 +19,3 @@ * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default

*/
export default (function () {
var _default = function _default() {
return {

@@ -25,11 +32,11 @@ threshold: function threshold(_ref, cb) {

if (typeof max !== 'number') {
return throwError.call(this, 'max must be a number', cb);
return _utils.throwError.call(this, 'max must be a number', cb);
}
if (typeof replace !== 'number') {
return throwError.call(this, 'replace must be a number', cb);
return _utils.throwError.call(this, 'replace must be a number', cb);
}
if (typeof autoGreyscale !== 'boolean') {
return throwError.call(this, 'autoGreyscale must be a boolean', cb);
return _utils.throwError.call(this, 'autoGreyscale must be a boolean', cb);
}

@@ -51,3 +58,3 @@

if (isNodePattern(cb)) {
if ((0, _utils.isNodePattern)(cb)) {
cb.call(this, null, this);

@@ -59,3 +66,5 @@ }

};
});
};
exports["default"] = _default;
//# sourceMappingURL=index.js.map
{
"name": "@jimp/plugin-threshold",
"version": "0.8.6-canary.815.488.0",
"version": "0.8.6-canary.815.502.0",
"description": "Lightens an image.",

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

"@babel/runtime": "^7.7.2",
"@jimp/utils": "0.8.6-canary.815.488.0",
"@jimp/utils": "0.8.6-canary.815.502.0",
"core-js": "^3.4.1"

@@ -34,7 +34,7 @@ },

"devDependencies": {
"@jimp/custom": "0.8.6-canary.815.488.0",
"@jimp/jpeg": "0.8.6-canary.815.488.0",
"@jimp/plugin-color": "0.8.6-canary.815.488.0",
"@jimp/plugin-resize": "0.8.6-canary.815.488.0",
"@jimp/test-utils": "0.8.6-canary.815.488.0"
"@jimp/custom": "0.8.6-canary.815.502.0",
"@jimp/jpeg": "0.8.6-canary.815.502.0",
"@jimp/plugin-color": "0.8.6-canary.815.502.0",
"@jimp/plugin-resize": "0.8.6-canary.815.502.0",
"@jimp/test-utils": "0.8.6-canary.815.502.0"
},

@@ -44,3 +44,3 @@ "publishConfig": {

},
"gitHead": "3260b0cc7bddc7360f70248e28fdd815b7d17c8c"
"gitHead": "5a68a9702462d87d579c9a54c5170d4940a2991d"
}

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