2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Changing to file level use strict statement

This commit is contained in:
mzabriskie
2015-03-18 17:21:15 -06:00
parent fc12b933f7
commit 60a82ef424
15 changed files with 31 additions and 45 deletions
+2 -3
View File
@@ -1,8 +1,9 @@
'use strict';
var utils = require('./../utils');
module.exports = {
write: function write(name, value, expires, path, domain, secure) {
'use strict';
var cookie = [];
cookie.push(name + '=' + encodeURIComponent(value));
@@ -26,13 +27,11 @@ module.exports = {
},
read: function read(name) {
'use strict';
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
},
remove: function remove(name) {
'use strict';
this.write(name, '', Date.now() - 86400000);
}
};