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

jquery-cropper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-cropper - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

CHANGELOG.md
# Changelog
## 1.0.1 (Oct 19, 2019)
- Register as a plugin only when both the jQuery and Cropper.js are existing.
## 1.0.0 (Apr 1, 2018)

@@ -4,0 +8,0 @@

18

dist/jquery-cropper.common.js
/*!
* jQuery Cropper v1.0.0
* https://github.com/fengyuanchen/jquery-cropper
* jQuery Cropper v1.0.1
* https://fengyuanchen.github.io/jquery-cropper
*
* Copyright (c) 2018 Chen Fengyuan
* Copyright 2018-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-01T06:20:13.168Z
* Date: 2019-10-19T08:48:33.062Z
*/

@@ -18,3 +18,3 @@

if ($.fn) {
if ($ && $.fn && Cropper) {
var AnotherCropper = $.fn.cropper;

@@ -24,8 +24,7 @@ var NAMESPACE = 'cropper';

$.fn.cropper = function jQueryCropper(option) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var result = void 0;
var result;
this.each(function (i, element) {

@@ -42,3 +41,2 @@ var $element = $(element);

var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
cropper = new Cropper(element, options);

@@ -64,3 +62,2 @@ $element.data(NAMESPACE, cropper);

});
return result !== undefined ? result : this;

@@ -71,2 +68,3 @@ };

$.fn.cropper.setDefaults = Cropper.setDefaults;
$.fn.cropper.noConflict = function noConflict() {

@@ -73,0 +71,0 @@ $.fn.cropper = AnotherCropper;

/*!
* jQuery Cropper v1.0.0
* https://github.com/fengyuanchen/jquery-cropper
* jQuery Cropper v1.0.1
* https://fengyuanchen.github.io/jquery-cropper
*
* Copyright (c) 2018 Chen Fengyuan
* Copyright 2018-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-01T06:20:13.168Z
* Date: 2019-10-19T08:48:33.062Z
*/

@@ -14,3 +14,3 @@

if ($.fn) {
if ($ && $.fn && Cropper) {
var AnotherCropper = $.fn.cropper;

@@ -20,8 +20,7 @@ var NAMESPACE = 'cropper';

$.fn.cropper = function jQueryCropper(option) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var result = void 0;
var result;
this.each(function (i, element) {

@@ -38,3 +37,2 @@ var $element = $(element);

var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
cropper = new Cropper(element, options);

@@ -60,3 +58,2 @@ $element.data(NAMESPACE, cropper);

});
return result !== undefined ? result : this;

@@ -67,2 +64,3 @@ };

$.fn.cropper.setDefaults = Cropper.setDefaults;
$.fn.cropper.noConflict = function noConflict() {

@@ -69,0 +67,0 @@ $.fn.cropper = AnotherCropper;

/*!
* jQuery Cropper v1.0.0
* https://github.com/fengyuanchen/jquery-cropper
* jQuery Cropper v1.0.1
* https://fengyuanchen.github.io/jquery-cropper
*
* Copyright (c) 2018 Chen Fengyuan
* Copyright 2018-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-01T06:20:13.168Z
* Date: 2019-10-19T08:48:33.062Z
*/

@@ -14,4 +14,4 @@

typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
(factory(global.jQuery,global.Cropper));
}(this, (function ($,Cropper) { 'use strict';
(global = global || self, factory(global.jQuery, global.Cropper));
}(this, function ($, Cropper) { 'use strict';

@@ -21,3 +21,3 @@ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;

if ($.fn) {
if ($ && $.fn && Cropper) {
var AnotherCropper = $.fn.cropper;

@@ -27,8 +27,7 @@ var NAMESPACE = 'cropper';

$.fn.cropper = function jQueryCropper(option) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var result = void 0;
var result;
this.each(function (i, element) {

@@ -45,3 +44,2 @@ var $element = $(element);

var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
cropper = new Cropper(element, options);

@@ -67,3 +65,2 @@ $element.data(NAMESPACE, cropper);

});
return result !== undefined ? result : this;

@@ -74,2 +71,3 @@ };

$.fn.cropper.setDefaults = Cropper.setDefaults;
$.fn.cropper.noConflict = function noConflict() {

@@ -81,2 +79,2 @@ $.fn.cropper = AnotherCropper;

})));
}));
/*!
* jQuery Cropper v1.0.0
* https://github.com/fengyuanchen/jquery-cropper
* jQuery Cropper v1.0.1
* https://fengyuanchen.github.io/jquery-cropper
*
* Copyright (c) 2018 Chen Fengyuan
* Copyright 2018-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-01T06:20:13.168Z
* Date: 2019-10-19T08:48:33.062Z
*/
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery"),require("cropperjs")):"function"==typeof define&&define.amd?define(["jquery","cropperjs"],r):r(e.jQuery,e.Cropper)}(this,function(c,s){"use strict";if(c=c&&c.hasOwnProperty("default")?c.default:c,s=s&&s.hasOwnProperty("default")?s.default:s,c.fn){var e=c.fn.cropper,d="cropper";c.fn.cropper=function(p){for(var e=arguments.length,a=Array(1<e?e-1:0),r=1;r<e;r++)a[r-1]=arguments[r];var u=void 0;return this.each(function(e,r){var t=c(r),n="destroy"===p,o=t.data(d);if(!o){if(n)return;var f=c.extend({},t.data(),c.isPlainObject(p)&&p);o=new s(r,f),t.data(d,o)}if("string"==typeof p){var i=o[p];c.isFunction(i)&&((u=i.apply(o,a))===o&&(u=void 0),n&&t.removeData(d))}}),void 0!==u?u:this},c.fn.cropper.Constructor=s,c.fn.cropper.setDefaults=s.setDefaults,c.fn.cropper.noConflict=function(){return c.fn.cropper=e,this}}});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery"),require("cropperjs")):"function"==typeof define&&define.amd?define(["jquery","cropperjs"],r):r((e=e||self).jQuery,e.Cropper)}(this,function(c,s){"use strict";if(c=c&&c.hasOwnProperty("default")?c.default:c,s=s&&s.hasOwnProperty("default")?s.default:s,c&&c.fn&&s){var e=c.fn.cropper,d="cropper";c.fn.cropper=function(p){for(var e=arguments.length,a=new Array(1<e?e-1:0),r=1;r<e;r++)a[r-1]=arguments[r];var u;return this.each(function(e,r){var t=c(r),n="destroy"===p,o=t.data(d);if(!o){if(n)return;var f=c.extend({},t.data(),c.isPlainObject(p)&&p);o=new s(r,f),t.data(d,o)}if("string"==typeof p){var i=o[p];c.isFunction(i)&&((u=i.apply(o,a))===o&&(u=void 0),n&&t.removeData(d))}}),void 0!==u?u:this},c.fn.cropper.Constructor=s,c.fn.cropper.setDefaults=s.setDefaults,c.fn.cropper.noConflict=function(){return c.fn.cropper=e,this}}});
{
"name": "jquery-cropper",
"description": "A jQuery plugin wrapper for Cropper.js.",
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/jquery-cropper.common.js",
"module": "dist/jquery-cropper.esm.js",
"unpkg": "dist/jquery-cropper.js",
"repository": "fengyuanchen/jquery-cropper",
"homepage": "https://fengyuanchen.github.io/jquery-cropper",
"license": "MIT",
"author": {
"name": "Chen Fengyuan",
"url": "http://chenfengyuan.com"
},
"browser": "dist/jquery-cropper.js",
"files": [

@@ -19,2 +12,16 @@ "src",

],
"scripts": {
"build": "rollup -c",
"clear": "del-cli dist",
"codecov": "cat coverage/lcov.info | codecov",
"compress": "uglifyjs dist/jquery-cropper.js -o dist/jquery-cropper.min.js -c -m --comments /^!/",
"lint": "eslint src test *.js --fix",
"release": "npm run clear && npm run lint && npm run build && npm run compress && npm test",
"start": "rollup -c -m -w",
"test": "karma start"
},
"repository": {
"type": "git",
"url": "git+https://github.com/fengyuanchen/jquery-cropper.git"
},
"keywords": [

@@ -40,46 +47,71 @@ "image",

],
"scripts": {
"build": "rollup -c",
"clear": "del-cli dist",
"commitmsg": "npm run lint && commitlint -e",
"compress": "uglifyjs dist/jquery-cropper.js -o dist/jquery-cropper.min.js -c -m --comments /^!/",
"lint": "eslint src test *.js --fix",
"release": "npm run clear && npm run lint && npm run build && npm run compress && npm test",
"start": "rollup -c -m -w",
"test": "karma start test/karma.conf.js"
"author": {
"name": "Chen Fengyuan",
"url": "https://chenfengyuan.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/fengyuanchen/jquery-cropper/issues"
},
"homepage": "https://fengyuanchen.github.io/jquery-cropper",
"devDependencies": {
"@commitlint/cli": "^6.1.3",
"@commitlint/config-angular": "^6.1.3",
"babel-core": "^6.26.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-env": "^1.6.1",
"chai": "^4.1.2",
"cropperjs": "^1.3.4",
"del-cli": "^1.1.0",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.10.0",
"husky": "^0.14.3",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"babel-plugin-istanbul": "^5.2.0",
"chai": "^4.2.0",
"codecov": "^3.6.1",
"create-banner": "^1.0.0",
"cropperjs": "^1.5.6",
"del-cli": "^3.0.0",
"eslint": "^6.5.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"husky": "^3.0.9",
"jquery": "^3.3.1",
"karma": "^2.0.0",
"lint-staged": "^9.4.2",
"karma": "^4.4.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-rollup-preprocessor": "^5.1.1",
"mocha": "^5.0.5",
"puppeteer": "^1.2.0",
"rollup": "^0.57.1",
"rollup-plugin-alias": "^1.4.0",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-node-resolve": "^3.3.0",
"karma-rollup-preprocessor": "^7.0.2",
"mocha": "^6.2.2",
"puppeteer": "^1.20.0",
"rollup": "^1.25.0",
"rollup-plugin-alias": "^2.1.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-watch": "^4.3.1",
"uglify-js": "^3.3.17"
"uglify-js": "^3.6.2"
},
"peerDependencies": {
"cropperjs": ">= 1.0.0",
"jquery": ">= 1.9.1"
"cropperjs": ">=1.0.0",
"jquery": ">=1.9.1"
},
"browserslist": [
"last 2 versions",
"> 1%",
"not ie <= 8"
],
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"{src,test}/**/*.js|*.conf*.js": [
"eslint --fix",
"git add"
]
}
}
# jquery-cropper
[![Build Status](https://travis-ci.org/fengyuanchen/jquery-cropper.svg)](https://travis-ci.org/fengyuanchen/jquery-cropper) [![Downloads](https://img.shields.io/npm/dm/jquery-cropper.svg)](https://www.npmjs.com/package/jquery-cropper) [![Version](https://img.shields.io/npm/v/jquery-cropper.svg)](https://www.npmjs.com/package/jquery-cropper)
[![Build Status](https://img.shields.io/travis/fengyuanchen/jquery-cropper.svg)](https://travis-ci.org/fengyuanchen/jquery-cropper) [![Coverage Status](https://img.shields.io/codecov/c/github/fengyuanchen/jquery-cropper.svg)](https://codecov.io/gh/fengyuanchen/jquery-cropper) [![Downloads](https://img.shields.io/npm/dm/jquery-cropper.svg)](https://www.npmjs.com/package/jquery-cropper) [![Version](https://img.shields.io/npm/v/jquery-cropper.svg)](https://www.npmjs.com/package/jquery-cropper)

@@ -121,6 +121,6 @@ > A jQuery plugin wrapper for [Cropper.js](https://github.com/fengyuanchen/cropperjs).

Maintained under the [Semantic Versioning guidelines](http://semver.org/).
Maintained under the [Semantic Versioning guidelines](https://semver.org/).
## License
[MIT](http://opensource.org/licenses/MIT) © [Chen Fengyuan](http://chenfengyuan.com)
[MIT](https://opensource.org/licenses/MIT) © [Chen Fengyuan](https://chenfengyuan.com)
import $ from 'jquery';
import Cropper from 'cropperjs';
if ($.fn) {
if ($ && $.fn && Cropper) {
const AnotherCropper = $.fn.cropper;

@@ -6,0 +6,0 @@ const NAMESPACE = 'cropper';

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