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

idcrop

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idcrop - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

dist/css/main.min.css

6

package.json
{
"name": "idcrop",
"version": "1.2.1",
"version": "1.2.2",
"description": "Image cropper utility that crops an image in any polygonal shape chosen and returns a base64 of the cropped area.",

@@ -13,4 +13,4 @@ "main": "dist/js/bundle.min.js",

"start": "webpack-dev-server --open -d",
"lint": "./node_modules/.bin/eslint ./lib/js/*.js",
"fix": "./node_modules/.bin/eslint ./lib/js/*.js --fix"
"lint": "./node_modules/.bin/eslint ./lib/js/*.js && ./node_modules/.bin/eslint ./lib/js/idcrop/*.js",
"fix": "./node_modules/.bin/eslint ./lib/js/*.js --fix && ./node_modules/.bin/eslint ./lib/js/idcrop/*.js --fix"
},

@@ -17,0 +17,0 @@ "repository": {

@@ -16,5 +16,12 @@ # IdCrop

```js
const idcrop = require('idcrop')
const IdCrop = require("idcrop");
idcrop.init('toolbarContainer', 'displayContainer', 'previewContainer', 4)
const idcrop = new IdCrop(
"#displayContainer",
"#previewContainer",
"#toolbarContainer",
6
);
idcrop.init();
```

@@ -24,5 +31,5 @@

- The id of the container you want the toolbar to render at.
- The id of the container you want the display to render at.
- The id of the container you want the preview to render at.
- The CSS selector of the container you want the toolbar to render at.
- The CSS selector of the container you want the display to render at.
- The CSS selector of the container you want the preview to render at.
- The number of sides you want the cropping polygon to have.

@@ -35,2 +42,4 @@

**For now, you can only have one cropper per page.**
```html

@@ -37,0 +46,0 @@ <!DOCTYPE html>

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