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

lipo

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lipo - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

90

lib/index.js

@@ -9,4 +9,8 @@ "use strict";

const _ = require('lodash');
const _isString = require('lodash.isstring');
const _isBuffer = require('lodash.isbuffer');
const _isObject = require('lodash.isobject');
const safeStringify = require('fast-safe-stringify');

@@ -40,3 +44,4 @@

this.__toFile = universalify.fromPromise(this.__toFile);
this.__toBuffer = universalify.fromPromise(this.__toBuffer);
this.__toBuffer = universalify.fromPromise(this.__toBuffer); // eslint-disable-next-line no-constructor-return
return input => {

@@ -63,5 +68,5 @@ this.__input = input;

// - background (String | Object)
if (_.isString(input) || _.isBuffer(input)) this.__input = input;
else if (_.isObject(this.__input)) this.__options = input;
if (!_.isObject(this.__input) && _.isObject(options))
if (_isString(input) || _isBuffer(input)) this.__input = input;
else if (_isObject(this.__input)) this.__options = input;
if (!_isObject(this.__input) && _isObject(options))
this._options = options;

@@ -75,30 +80,30 @@ return this;

const body = new FormData();
if (_.isString(this.__input)) body.append('input', fs.createReadStream(this.__input));else if (_.isBuffer(this.__input)) body.append('input', this.__input);else if (_.isObject(this.__input)) body.append('options', safeStringify(this.__input));
if (_isString(this.__input)) body.append('input', fs.createReadStream(this.__input));else if (_isBuffer(this.__input)) body.append('input', this.__input);else if (_isObject(this.__input)) body.append('options', safeStringify(this.__input));
body.append('queue', safeStringify(this.__queue));
this.__queue = [];
const res = await this.__api.post('/', {
const response = await this.__api.post('/', {
body
});
if (res.err) throw res.err;
return res.body;
if (response.err) throw response.err;
return response.body;
}
async __toFile(fileOut) {
if (!_.isString(fileOut)) throw new Error('File output path required');
if (!_isString(fileOut)) throw new Error('File output path required');
const body = new FormData();
if (_.isString(this.__input)) body.append('input', fs.createReadStream(this.__input));else if (_.isBuffer(this.__input)) body.append('input', this.__input);else if (_.isObject(this.__input)) body.append('options', safeStringify(this.__input));
if (_isString(this.__input)) body.append('input', fs.createReadStream(this.__input));else if (_isBuffer(this.__input)) body.append('input', this.__input);else if (_isObject(this.__input)) body.append('options', safeStringify(this.__input));
body.append('queue', safeStringify(this.__queue));
this.__queue = [];
const res = await this.__api.post('/', {
const response = await this.__api.post('/', {
body,
raw: true
});
if (res.err) throw res.err;
if (response.err) throw response.err;
this.__info = {
format: res.headers.get('x-sharp-format'),
size: Number(res.headers.get('x-sharp-size')),
width: Number(res.headers.get('x-sharp-width')),
height: Number(res.headers.get('x-sharp-height')),
channels: Number(res.headers.get('x-sharp-channels')),
premultiplied: boolean(res.headers.get('x-sharp-multiplied'))
format: response.headers.get('x-sharp-format'),
size: Number(response.headers.get('x-sharp-size')),
width: Number(response.headers.get('x-sharp-width')),
height: Number(response.headers.get('x-sharp-height')),
channels: Number(response.headers.get('x-sharp-channels')),
premultiplied: boolean(response.headers.get('x-sharp-multiplied'))
};

@@ -117,3 +122,3 @@ const stream = fs.createWriteStream(fileOut); // let timer;

});
res.body.on('error', reject).pipe(stream);
response.body.on('error', reject).pipe(stream);
});

@@ -125,20 +130,20 @@ return promise;

const body = new FormData();
if (_.isString(this.__input)) body.append('input', fs.createReadStream(this.__input));else if (_.isBuffer(this.__input)) body.append('input', this.__input);else if (_.isObject(this.__input)) body.append('options', safeStringify(this.__input));
if (_isString(this.__input)) body.append('input', fs.createReadStream(this.__input));else if (_isBuffer(this.__input)) body.append('input', this.__input);else if (_isObject(this.__input)) body.append('options', safeStringify(this.__input));
body.append('queue', safeStringify(this.__queue));
this.__queue = [];
const res = await this.__api.post('/', {
const response = await this.__api.post('/', {
body,
raw: true
});
if (res.err) throw res.err;
if (response.err) throw response.err;
this.__info = {
format: res.headers.get('x-sharp-format'),
size: Number(res.headers.get('x-sharp-size')),
width: Number(res.headers.get('x-sharp-width')),
height: Number(res.headers.get('x-sharp-height')),
channels: Number(res.headers.get('x-sharp-channels')),
premultiplied: boolean(res.headers.get('x-sharp-multiplied'))
format: response.headers.get('x-sharp-format'),
size: Number(response.headers.get('x-sharp-size')),
width: Number(response.headers.get('x-sharp-width')),
height: Number(response.headers.get('x-sharp-height')),
channels: Number(response.headers.get('x-sharp-channels')),
premultiplied: boolean(response.headers.get('x-sharp-multiplied'))
};
const data = await res.buffer();
if (_.isObject(options) && boolean(options.resolveWithObject)) return {
const data = await response.buffer();
if (_isObject(options) && boolean(options.resolveWithObject)) return {
data,

@@ -157,3 +162,3 @@ info: this.__info

keys.forEach(key => {
for (const key of keys) {
Lipo.prototype[key] = function (...args) {

@@ -175,7 +180,12 @@ if (!['toFile', 'toBuffer', 'metadata'].includes(key)) {

};
}); // Sourced from `lib/resize.js`:
}
function lipo(config) {
return new Lipo(config);
} // Sourced from `lib/resize.js`:
// <https://github.com/lovell/sharp/blob/master/lib/resize.js>
// Weighting to apply when using contain/cover fit.
Lipo.gravity = {
lipo.gravity = {
center: 0,

@@ -193,3 +203,3 @@ centre: 0,

Lipo.position = {
lipo.position = {
top: 1,

@@ -205,3 +215,3 @@ right: 2,

Lipo.strategy = {
lipo.strategy = {
entropy: 16,

@@ -211,3 +221,3 @@ attention: 17

Lipo.kernel = {
lipo.kernel = {
nearest: 'nearest',

@@ -219,3 +229,3 @@ cubic: 'cubic',

Lipo.fit = {
lipo.fit = {
contain: 'contain',

@@ -227,3 +237,3 @@ cover: 'cover',

};
module.exports = Lipo;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJmcyIsInJlcXVpcmUiLCJGb3JtRGF0YSIsIkZyaXNiZWUiLCJfIiwic2FmZVN0cmluZ2lmeSIsInVuaXZlcnNhbGlmeSIsImJvb2xlYW4iLCJrZXlzIiwiTGlwbyIsImNvbnN0cnVjdG9yIiwiY29uZmlnIiwiX19jb25maWciLCJrZXkiLCJwc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bGFuY3pvczMnXG59O1xuXG4vLyBNZXRob2RzIGJ5IHdoaWNoIGFuIGltYWdlIGNhbiBiZSByZXNpemVkIHRvIGZpdCB0aGUgcHJvdmlkZWQgZGltZW5zaW9ucy5cbkxpcG8uZml0ID0ge1xuICBjb250YWluOiAnY29udGFpbicsXG4gIGNvdmVyOiAnY292ZXInLFxuICBmaWxsOiAnZmlsbCcsXG4gIGluc2lkZTogJ2luc2lkZScsXG4gIG91dHNpZGU6ICdvdXRzaWRlJ1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSBMaXBvO1xuIl19
module.exports = lipo;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJmcyIsInJlcXVpcmUiLCJGb3JtRGF0YSIsIkZyaXNiZWUiLCJfaXNTdHJpbmciLCJfaXNCdWZmZXIiLCJfaXNPYmplY3QiLCJzYWZlU3RyaW5naWZ5IiwidW5pdmVyc2FsaWZ5IiwiYm9vbGVhbiIsImtleXMiLCJMaXBvIiwiY29uc3RydWN0b3IiLCJjb25maWciLCJfX2NvbmZpZyIsImtleSIsInByb2Nlc3MiLCJlbnYiLCJMSVBPX0tFWSIsImJhc2VVUkkiLCJMSVBPIiwiX19hcGkiLCJoZWFkZXJzIiwiQWNjZXB0IiwiYXV0aCIsIl9fcXVldWUiLCJfX21ldGFkYXRhIiwiZnJvbVByb21pc2UiLCJfX3RvRmlsZSIsIl9fdG9CdWZmZXIiLCJpbnB1dCIsIl9faW5wdXQiLCJib2R5IiwiYXBwZW5kIiwiY3JlYXRlUmVhZFN0cmVhbSIsInJlc3BvbnNlIiwicG9zdCIsImVyciIsImZpbGVPdXQiLCJFcnJvciIsInJhdyIsIl9faW5mbyIsImZvcm1hdCIsImdldCIsInNpemUiLCJOdW1iZXIiLCJ3aWR0aCIsImhlaWdodCIsImNoYW5uZWxzIiwicHJlbXVsdGlwbGllZCI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4gIGN1YmljOiAnY3ViaWMnLFxuICBsYW5jem9zMjogJ2xhbmN6b3MyJyxcbiAgbGFuY3pvczM6ICdsYW5jem9zMydcbn07XG5cbi8vIE1ldGhvZHMgYnkgd2hpY2ggYW4gaW1hZ2UgY2FuIGJlIHJlc2l6ZWQgdG8gZml0IHRoZSBwcm92aWRlZCBkaW1lbnNpb25zLlxubGlwby5maXQgPSB7XG4gIGNvbnRhaW46ICdjb250YWluJyxcbiAgY292ZXI6ICdjb3ZlcicsXG4gIGZpbGw6ICdmaWxsJyxcbiAgaW5zaWRlOiAnaW5zaWRlJyxcbiAgb3V0c2lkZTogJ291dHNpZGUnXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IGxpcG87XG4iXX0=
{
"name": "lipo",
"description": "Free image manipulation API service built on top of Sharp (an alternative to Jimp, Graphics Magic, Image Magick, and PhantomJS)",
"version": "1.0.1",
"version": "2.0.0",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -21,42 +21,46 @@ "ava": {

"contributors": [
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",
"Imed Jaberi <imed_jebari@hotmail.fr> (https://3imed-jaberi.com/)"
],
"dependencies": {
"boolean": "^3.0.0",
"boolean": "^3.0.1",
"fast-safe-stringify": "^2.0.7",
"form-data": "3.0.0",
"frisbee": "^3.1.2",
"lodash": "^4.17.15",
"frisbee": "^3.1.4",
"lodash.isbuffer": "^4.3.4",
"lodash.isobject": "^3.0.2",
"lodash.isstring": "^4.0.1",
"universalify": "^0.1.2"
},
"devDependencies": {
"@babel/cli": "^7.7.4",
"@babel/core": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@koa/multer": "^2.0.1",
"ava": "^2.4.0",
"@babel/cli": "^7.10.4",
"@babel/core": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@commitlint/cli": "^9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"@koa/multer": "2.x",
"ava": "^3.10.1",
"bytes": "^3.1.0",
"codecov": "^3.6.1",
"cross-env": "^6.0.3",
"codecov": "^3.7.0",
"cross-env": "^7.0.2",
"errorhandler": "^1.5.1",
"eslint": "^6.7.1",
"eslint": "^7.4.0",
"eslint-config-xo-lass": "^1.0.3",
"eslint-plugin-compat": "^3.3.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-compat": "^3.8.0",
"eslint-plugin-node": "^11.1.0",
"express": "^4.17.1",
"husky": "^3.1.0",
"koa": "^2.11.0",
"koa-better-error-handler": "^3.0.3",
"koa-bodyparser": "^4.2.1",
"lint-staged": "^9.5.0",
"lipo-express": "^0.0.4",
"lipo-koa": "^0.1.3",
"husky": "^4.2.5",
"koa": "^2.13.0",
"koa-better-error-handler": "^5.0.0",
"koa-bodyparser": "^4.3.0",
"lint-staged": "^10.2.11",
"lipo-express": "^0.0.5",
"lipo-koa": "^0.1.5",
"multer": "^2.0.0-beta.1",
"nyc": "^14.1.1",
"remark-cli": "^7.0.1",
"remark-preset-github": "^0.0.16",
"uuid": "^3.3.3",
"xo": "^0.25.3"
"nyc": "^15.1.0",
"remark-cli": "^8.0.0",
"remark-preset-github": "^2.0.2",
"rimraf": "^3.0.2",
"uuid": "^8.2.0",
"xo": "^0.32.1"
},

@@ -139,11 +143,14 @@ "engines": {

"scripts": {
"ava": "cross-env NODE_ENV=test LIPO=true ava",
"build": "node_modules/.bin/babel src --out-dir lib",
"build": "babel src --out-dir lib",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"lint": "xo && remark . -qfo",
"nyc": "cross-env NODE_ENV=test LIPO=true nyc ava",
"lint": "npm run lint:c && npm run lint:md",
"lint:c": "xo",
"lint:md": "remark . -qfo",
"postbuild": "npm run lint",
"prebuild": "rimraf lib",
"precommit": "lint-staged && npm test",
"test": "npm run build && npm run lint && npm run ava",
"test-coverage": "npm run build && npm run lint && npm run nyc",
"watch": "node_modules/.bin/babel src --watch --out-dir lib"
"pretest": "npm run build",
"test": "cross-env NODE_ENV=test LIPO=true ava",
"test-coverage": "cross-env NODE_ENV=test LIPO=true nyc test",
"watch": "babel src --watch --out-dir lib"
},

@@ -150,0 +157,0 @@ "xo": {

@@ -5,3 +5,3 @@ <h1 align="center">

<div align="center">
<a href="https://slack.crocodilejs.com"><img src="https://slack.crocodilejs.com/badge.svg" alt="chat" /></a>
<a href="https://join.slack.com/t/ladjs/shared_invite/zt-fqei6z11-Bq2trhwHQxVc5x~ifiZG0g"><img src="https://img.shields.io/badge/chat-join%20slack-brightgreen" alt="chat" /></a>
<a href="https://travis-ci.org/lipojs/lipo"><img src="https://img.shields.io/travis/lipojs/lipo.svg" alt="build status" /></a>

@@ -64,4 +64,3 @@ <a href="https://codecov.io/github/lipojs/lipo"><img src="https://img.shields.io/codecov/c/github/lipojs/lipo/master.svg" alt="code coverage" /></a>

```js
const Lipo = require('lipo');
const lipo = new Lipo();
const lipo = require('lipo');
lipo('input.jpg')

@@ -81,4 +80,3 @@ .resize(300, 300)

-const sharp = require('sharp');
+const Lipo = require('lipo');
+const lipo = new Lipo();
+const lipo = require('lipo');
-sharp('input.jpg')

@@ -109,3 +107,3 @@ +lipo('input.jpg')

Once you sign up for a key, you can pass it as `const lipo = new Lipo({ key: 'YOUR_API_KEY_HERE' });` or as an environment variable (e.g. `LIPO_KEY=YOUR_API_KEY_HERE node app.js`).
Once you sign up for a key, you can pass it as `const lipo = require('lipo')({ key: 'YOUR_API_KEY_HERE' });` or as an environment variable (e.g. `LIPO_KEY=YOUR_API_KEY_HERE node app.js`).

@@ -149,5 +147,6 @@

| Name | Website |
| -------------- | -------------------------- |
| **Nick Baugh** | <http://niftylettuce.com/> |
| Name | Website |
| --------------- | --------------------------- |
| **Nick Baugh** | <http://niftylettuce.com/> |
| **Imed Jaberi** | <https://3imed-jaberi.com/> |

@@ -154,0 +153,0 @@

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