add sidebar with logo

This commit is contained in:
2023-11-25 22:13:57 -05:00
parent 6ef22d88f9
commit 0190a553ba
30496 changed files with 579293 additions and 3701404 deletions
+6 -7
View File
@@ -1,15 +1,14 @@
'use strict';
module.exports = string => {
if (typeof string !== 'string') {
throw new TypeError(`Expected a string, got ${typeof string}`);
module.exports = x => {
if (typeof x !== 'string') {
throw new TypeError('Expected a string, got ' + typeof x);
}
// Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
// conversion translates it to FEFF (UTF-16 BOM)
if (string.charCodeAt(0) === 0xFEFF) {
return string.slice(1);
if (x.charCodeAt(0) === 0xFEFF) {
return x.slice(1);
}
return string;
return x;
};