dashboardjavacloudcoapiotiot-analyticsiot-platformiot-solutionskafkalwm2mmicroservicesmiddlewaremqttnettyplatformsnmpthingsboardvisualizationwebsocketswidgets
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
576 B
16 lines
576 B
export default {
|
|
encodeBase64: function encodeBase64(str) {
|
|
// Avoid Buffer constructor on newer versions of Node.js.
|
|
const buffer = (Buffer.from ? Buffer.from(str) : (new Buffer(str)));
|
|
return buffer.toString('base64');
|
|
},
|
|
mimeLookup: function (filename) {
|
|
return require('mime').lookup(filename);
|
|
},
|
|
charsetLookup: function (mime) {
|
|
return require('mime').charsets.lookup(mime);
|
|
},
|
|
getSourceMapGenerator: function getSourceMapGenerator() {
|
|
return require('source-map').SourceMapGenerator;
|
|
}
|
|
};
|
|
|