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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user