You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@szydlovski/canvas-utility

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@szydlovski/canvas-utility - npm Package Compare versions

Comparing version

to
2.0.0

build/canvas-ops/adjustCanvas.d.ts

12

package.json
{
"name": "@szydlovski/canvas-utility",
"version": "1.2.0",
"version": "2.0.0",
"description": "simple canvas 2d utility - trimming, rotating, resizing",
"main": "dist/bundle.js",
"main": "build/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rollup -c",
"build": "tsc",
"dev": "rollup -c --watch"

@@ -20,3 +19,6 @@ },

"@rollup/plugin-node-resolve": "^11.0.1",
"rollup": "^2.35.1"
"@rollup/plugin-typescript": "^8.2.5",
"rollup": "^2.35.1",
"tslib": "^2.3.0",
"typescript": "^4.3.5"
},

@@ -23,0 +25,0 @@ "dependencies": {

@@ -38,3 +38,3 @@ This library contains various utilities designed for working with the HTML5 Canvas. It facilitates operations like creating, copying, cropping, trimming, flipping, merging, resizing and rotating canvases.

The functions can be neatly composed to quickly
The functions can be neatly composed to create utilities:

@@ -50,3 +50,6 @@ ```js

const resizeAndCropPreviewImage = (image) =>
Canvas.fromImage(image).crop('1:1').resize({ width: 250 }).toElement();
Canvas.fromImage(image)
.crop('1:1')
.resize({ width: 250 })
.toElement();
```

@@ -56,2 +59,6 @@

## [2.0.0] - 2021-08-01
Full TypeScript rewrite.
## [1.2.0] - 2021-08-01

@@ -58,0 +65,0 @@

import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
export default {
input: 'src/index.js',
input: 'src/index.ts',
output: {
sourcemap: true,
file: 'dist/bundle.js',
format: 'esm'
file: 'dev/bundle.js',
format: 'esm',
declaration: true
},
plugins: [ resolve() ]
plugins: [ resolve(), typescript() ]
};