/*!
- * jQuery Cookie Plugin v1.4.0
+ * jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
- * Copyright 2013 Klaus Hartl
+ * Copyright 2006, 2014 Klaus Hartl
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
- // AMD. Register as anonymous module.
+ // AMD
define(['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // CommonJS
+ factory(require('jquery'));
} else {
- // Browser globals.
+ // Browser globals
factory(jQuery);
}
}(function ($) {
// Write
- if (value !== undefined && !$.isFunction(value)) {
+ if (arguments.length > 1 && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {