jquery-cropper
Advanced tools
Comparing version 1.0.0-beta to 1.0.0
# Changelog | ||
## 1.0.0 (Apr 1, 2018) | ||
- Just released as a stable version. | ||
## 1.0.0-beta (Mar 3, 2018) | ||
@@ -4,0 +8,0 @@ |
/*! | ||
* jQuery Cropper v1.0.0-beta | ||
* jQuery Cropper v1.0.0 | ||
* https://github.com/fengyuanchen/jquery-cropper | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: 2018-03-03T04:12:17.906Z | ||
* Date: 2018-04-01T06:20:13.168Z | ||
*/ | ||
@@ -63,3 +63,3 @@ | ||
return typeof result === 'undefined' ? this : result; | ||
return result !== undefined ? result : this; | ||
}; | ||
@@ -66,0 +66,0 @@ |
/*! | ||
* jQuery Cropper v1.0.0-beta | ||
* jQuery Cropper v1.0.0 | ||
* https://github.com/fengyuanchen/jquery-cropper | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: 2018-03-03T04:12:17.906Z | ||
* Date: 2018-04-01T06:20:13.168Z | ||
*/ | ||
@@ -59,3 +59,3 @@ | ||
return typeof result === 'undefined' ? this : result; | ||
return result !== undefined ? result : this; | ||
}; | ||
@@ -62,0 +62,0 @@ |
/*! | ||
* jQuery Cropper v1.0.0-beta | ||
* jQuery Cropper v1.0.0 | ||
* https://github.com/fengyuanchen/jquery-cropper | ||
@@ -8,69 +8,69 @@ * | ||
* | ||
* Date: 2018-03-03T04:12:17.906Z | ||
* Date: 2018-04-01T06:20:13.168Z | ||
*/ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) : | ||
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) : | ||
(factory(global.jQuery,global.Cropper)); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) : | ||
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) : | ||
(factory(global.jQuery,global.Cropper)); | ||
}(this, (function ($,Cropper) { 'use strict'; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper; | ||
if ($.fn) { | ||
var AnotherCropper = $.fn.cropper; | ||
var NAMESPACE = 'cropper'; | ||
if ($.fn) { | ||
var AnotherCropper = $.fn.cropper; | ||
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++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
$.fn.cropper = function jQueryCropper(option) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
var result = void 0; | ||
var result = void 0; | ||
this.each(function (i, element) { | ||
var $element = $(element); | ||
var isDestroy = option === 'destroy'; | ||
var cropper = $element.data(NAMESPACE); | ||
this.each(function (i, element) { | ||
var $element = $(element); | ||
var isDestroy = option === 'destroy'; | ||
var cropper = $element.data(NAMESPACE); | ||
if (!cropper) { | ||
if (isDestroy) { | ||
return; | ||
} | ||
if (!cropper) { | ||
if (isDestroy) { | ||
return; | ||
} | ||
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option); | ||
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option); | ||
cropper = new Cropper(element, options); | ||
$element.data(NAMESPACE, cropper); | ||
} | ||
cropper = new Cropper(element, options); | ||
$element.data(NAMESPACE, cropper); | ||
} | ||
if (typeof option === 'string') { | ||
var fn = cropper[option]; | ||
if (typeof option === 'string') { | ||
var fn = cropper[option]; | ||
if ($.isFunction(fn)) { | ||
result = fn.apply(cropper, args); | ||
if ($.isFunction(fn)) { | ||
result = fn.apply(cropper, args); | ||
if (result === cropper) { | ||
result = undefined; | ||
} | ||
if (result === cropper) { | ||
result = undefined; | ||
} | ||
if (isDestroy) { | ||
$element.removeData(NAMESPACE); | ||
if (isDestroy) { | ||
$element.removeData(NAMESPACE); | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
return typeof result === 'undefined' ? this : result; | ||
}; | ||
return result !== undefined ? result : this; | ||
}; | ||
$.fn.cropper.Constructor = Cropper; | ||
$.fn.cropper.setDefaults = Cropper.setDefaults; | ||
$.fn.cropper.noConflict = function noConflict() { | ||
$.fn.cropper = AnotherCropper; | ||
return this; | ||
}; | ||
} | ||
$.fn.cropper.Constructor = Cropper; | ||
$.fn.cropper.setDefaults = Cropper.setDefaults; | ||
$.fn.cropper.noConflict = function noConflict() { | ||
$.fn.cropper = AnotherCropper; | ||
return this; | ||
}; | ||
} | ||
}))); |
/*! | ||
* jQuery Cropper v1.0.0-beta | ||
* jQuery Cropper v1.0.0 | ||
* https://github.com/fengyuanchen/jquery-cropper | ||
@@ -8,4 +8,4 @@ * | ||
* | ||
* Date: 2018-03-03T04:12:17.906Z | ||
* Date: 2018-04-01T06:20:13.168Z | ||
*/ | ||
!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(e,r){"use strict";if(e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r,e.fn){var t=e.fn.cropper,n="cropper";e.fn.cropper=function(t){for(var o=arguments.length,f=Array(o>1?o-1:0),i=1;i<o;i++)f[i-1]=arguments[i];var p=void 0;return this.each(function(o,i){var a=e(i),u="destroy"===t,c=a.data(n);if(!c){if(u)return;var s=e.extend({},a.data(),e.isPlainObject(t)&&t);c=new r(i,s),a.data(n,c)}if("string"==typeof t){var d=c[t];e.isFunction(d)&&((p=d.apply(c,f))===c&&(p=void 0),u&&a.removeData(n))}}),void 0===p?this:p},e.fn.cropper.Constructor=r,e.fn.cropper.setDefaults=r.setDefaults,e.fn.cropper.noConflict=function(){return e.fn.cropper=t,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.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}}}); |
{ | ||
"name": "jquery-cropper", | ||
"description": "A jQuery plugin wrapper for Cropper.js.", | ||
"version": "1.0.0-beta", | ||
"version": "1.0.0", | ||
"main": "dist/jquery-cropper.common.js", | ||
@@ -37,4 +37,3 @@ "module": "dist/jquery-cropper.esm.js", | ||
"front-end", | ||
"web", | ||
"development" | ||
"web" | ||
], | ||
@@ -46,7 +45,6 @@ "scripts": { | ||
"compress": "uglifyjs dist/jquery-cropper.js -o dist/jquery-cropper.min.js -c -m --comments /^!/", | ||
"lint": "eslint src/js --fix", | ||
"lint": "eslint src test *.js --fix", | ||
"release": "npm run clear && npm run lint && npm run build && npm run compress && npm test", | ||
"start": "npm-run-all --parallel watch:*", | ||
"test": "karma start test/karma.conf.js", | ||
"watch": "rollup -c -m -w" | ||
"start": "rollup -c -m -w", | ||
"test": "karma start test/karma.conf.js" | ||
}, | ||
@@ -60,7 +58,7 @@ "devDependencies": { | ||
"chai": "^4.1.2", | ||
"cropperjs": "^1.3.2", | ||
"cropperjs": "^1.3.4", | ||
"del-cli": "^1.1.0", | ||
"eslint": "^4.18.2", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-plugin-import": "^2.9.0", | ||
"eslint-plugin-import": "^2.10.0", | ||
"husky": "^0.14.3", | ||
@@ -74,11 +72,11 @@ "jquery": "^3.3.1", | ||
"karma-rollup-preprocessor": "^5.1.1", | ||
"mocha": "^5.0.1", | ||
"puppeteer": "^1.1.1", | ||
"rollup": "^0.56.3", | ||
"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": "^8.3.0", | ||
"rollup-plugin-node-resolve": "^3.0.3", | ||
"rollup-plugin-commonjs": "^9.1.0", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-watch": "^4.3.1", | ||
"uglify-js": "^3.3.12" | ||
"uglify-js": "^3.3.17" | ||
}, | ||
@@ -85,0 +83,0 @@ "peerDependencies": { |
@@ -21,3 +21,3 @@ # jquery-cropper | ||
### Install | ||
### Installation | ||
@@ -24,0 +24,0 @@ ```shell |
@@ -44,3 +44,3 @@ import $ from 'jquery'; | ||
return typeof result === 'undefined' ? this : result; | ||
return result !== undefined ? result : this; | ||
}; | ||
@@ -47,0 +47,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
14506
1
1