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

Adding ESLint

This commit is contained in:
mzabriskie
2015-03-17 14:14:26 -06:00
parent 7387829d33
commit a98c61f458
17 changed files with 128 additions and 77 deletions
+4 -3
View File
@@ -1,9 +1,8 @@
'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));
@@ -27,11 +26,13 @@ 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);
}
};
};