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.0.2 to 1.2.0

LICENSE

24

package.json
{
"name": "idcrop",
"version": "1.0.2",
"description":
"Embed for cropping images and returning a base64 of the cropped area.",
"version": "1.2.0",
"description": "Embed for cropping images and returning a base64 of the cropped area.",
"main": "dist/js/bundle.min.js",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "webpack --progress -p -d",
"watch": "webpack --progress --watch -d",
"start": "webpack-dev-server --open -d"
"start": "webpack-dev-server --open -d",
"lint": "./node_modules/.bin/eslint ./lib/js/*.js",
"fix": "./node_modules/.bin/eslint ./lib/js/*.js --fix"
},

@@ -17,3 +20,8 @@ "repository": {

},
"keywords": ["idwall", "crop", "image", "upload"],
"keywords": [
"idwall",
"crop",
"image",
"upload"
],
"author": "Beatriz Rizental",

@@ -26,4 +34,8 @@ "license": "MIT",

"css-loader": "^0.28.7",
"eslint": "^4.12.1",
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-prettier": "^2.3.1",
"extract-text-webpack-plugin": "^3.0.2",
"node-sass": "^4.6.1",
"prettier": "^1.8.2",
"sass-loader": "^6.0.6",

@@ -30,0 +42,0 @@ "style-loader": "^0.19.0",

# IdCrop
Embed for cropping images and returning a base64 of the cropped area.
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
### Development Environment Setup
Image cropper utility that crops an image in any polygonal shape chosen and returns a base64 of the cropped area.
```bash
$ npm install & npm start
```
### Usage

@@ -22,5 +18,12 @@

idcrop.init('toolbarContainer', 'displayContainer', 'previewContainer')
idcrop.init('toolbarContainer', 'displayContainer', 'previewContainer', 4)
```
The paramenters for the `init` function are, in order:
- 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 number of sides you want the cropping polygon to have.
###### HTML

@@ -49,1 +52,20 @@

```
### Development Environment Setup
```bash
$ npm install & npm start
```
###### Linting
We use a combination of eslint and prettier for the formatting and linting of our JS code.
```bash
$ npm run lint
$ npm run fix
```
### License
Copyright © 2017, [Idwall](https://idwall.co/). Released under the [MIT license](https://github.com/idwall/idcrop/LICENSE).
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