mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
24
node_modules/base64-url/index.js
generated
vendored
Normal file
24
node_modules/base64-url/index.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
var base64url = module.exports;
|
||||
|
||||
base64url.unescape = function unescape (str) {
|
||||
return (str + Array(5 - str.length % 4)
|
||||
.join('='))
|
||||
.replace(/\-/g, '+')
|
||||
.replace(/_/g, '/');
|
||||
};
|
||||
|
||||
base64url.escape = function escape (str) {
|
||||
return str.replace(/\+/g, '-')
|
||||
.replace(/\//g, '_')
|
||||
.replace(/=/g, '');
|
||||
};
|
||||
|
||||
base64url.encode = function encode (str) {
|
||||
return this.escape(new Buffer(str).toString('base64'));
|
||||
};
|
||||
|
||||
base64url.decode = function decode (str) {
|
||||
return new Buffer(this.unescape(str), 'base64').toString();
|
||||
};
|
||||
Reference in New Issue
Block a user