Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mtproto/core

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mtproto/core - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

package.json
{
"name": "@mtproto/core",
"version": "0.0.4",
"version": "0.0.5",
"description": "Telegram API for browser",

@@ -5,0 +5,0 @@ "keywords": [

@@ -7,2 +7,3 @@ const debounce = require('lodash.debounce');

const {
arrayBufferToBase64,
bigStringInt,

@@ -1241,4 +1242,15 @@ bytesToHex,

}
getFileInBase64({ location, offset = 0, limit = 1024 * 1024 }) {
return this.call('upload.getFile', {
flags: 0,
offset,
limit,
location,
}).then(response => {
return arrayBufferToBase64(response.bytes);
});
}
}
module.exports = API;

@@ -97,2 +97,12 @@ const { Zlib } = require('zlibjs/bin/gunzip.min.js');

function arrayBufferToBase64(buffer) {
var binary = '';
var bytes = new Uint8Array(buffer);
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode(bytes[i]);
}
return window.btoa(binary);
}
function uint6ToBase64(nUint6) {

@@ -744,2 +754,3 @@ return nUint6 < 26

base64ToBlob,
arrayBufferToBase64,
dataUrlToBlob,

@@ -746,0 +757,0 @@ blobConstruct,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc