1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00

New updates and modules

This commit is contained in:
DanieL 2022-07-15 11:08:01 -03:00
parent 4d5d408898
commit 0abf0f90f6
959 changed files with 364301 additions and 17493 deletions

21
node_modules/level-js/util/serialize.js generated vendored Normal file
View file

@ -0,0 +1,21 @@
'use strict'
var Buffer = require('buffer').Buffer
// Returns either a Uint8Array or Buffer (doesn't matter to
// IndexedDB, because Buffer is a subclass of Uint8Array)
var str2bin = (function () {
if (global.TextEncoder) {
var encoder = new TextEncoder('utf-8')
return encoder.encode.bind(encoder)
} else {
return Buffer.from
}
})()
module.exports = function (data, asBuffer) {
if (asBuffer) {
return Buffer.isBuffer(data) ? data : str2bin(String(data))
} else {
return String(data)
}
}