diff --git a/README.md b/README.md index 090334d..b66961a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +:warning: This project is archived and the repository is no longer maintained. + cookie function ====== diff --git a/cookie.js b/cookie.js index 666d542..5f39322 100644 --- a/cookie.js +++ b/cookie.js @@ -1,6 +1,6 @@ /*! cookie function. get, set, or forget a cookie. [c]2014 @scottjehl, Filament Group, Inc. Licensed MIT */ (function(w){ - w.cookie = function( name, value, days ){ + var cookie = function( name, value, days ){ // if value is undefined, get the cookie value if( value === undefined ){ var cookiestring = "; " + w.document.cookie; @@ -26,6 +26,9 @@ }; // commonjs if( typeof module !== "undefined" ){ - module.exports = w.cookie; + module.exports = cookie; } -}( this )); + else { + w.cookie = cookie; + } +}( typeof global !== "undefined" ? global : this )); diff --git a/package.json b/package.json index 19c3bda..9d7be6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fg-cookie", - "version": "0.1.1", + "version": "1.0.0", "description": "Get, set, forget cookies!", "main": "cookie.js", "scripts": {