New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@skipper-dev/essentials

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skipper-dev/essentials - npm Package Compare versions

Comparing version 1.0.7 to 1.1.0

50

main.js

@@ -0,23 +1,37 @@

var axios = require("axios")
module.exports = {
decodeBase64(input) {
if (!input) return Error('You need to specify a base64 string to decode.')
if (typeof (input) != 'string') return Error('You have to provide a input type of string, recieved type ' + typeof (input))
try {
var decoded = new Buffer(input, 'base64').toString('ascii')
return decoded
} catch (err) {
return Error(err)
}
base64: {
decodeBase64(input) {
if (!input) return Error('You need to specify a base64 string to decode.')
if (typeof (input) != 'string') return Error('You have to provide a input type of string, recieved type ' + typeof (input))
try {
var decoded = new Buffer(input, 'base64').toString('ascii')
return decoded
} catch (err) {
return Error(err)
}
},
encodeBase64(input) {
if (!input) return Error('You need to specify a string to encode.')
if (typeof (input) != 'string') return Error('You have to provide a input type of string, recieved type ' + typeof (input))
try {
var decoded = new Buffer(input).toString('base64')
return decoded
} catch (err) {
return Error(err)
}
}
},
encodeBase64(input) {
if (!input) return Error('You need to specify a string to encode.')
if (typeof (input) != 'string') return Error('You have to provide a input type of string, recieved type ' + typeof(input))
try {
var decoded = new Buffer(input).toString('base64')
return decoded
} catch (err) {
return Error(err)
web: {
getRequest(url, headers) {
if (!url) return Error('Need to provide a URL to make a web request to.')
if (!headers) var headers = {}
axios.default({
method: 'GET',
url: url,
headers: headers
}).then(dat => {return dat}).catch(err => {return Error(err)})
}
}
}
{
"name": "@skipper-dev/essentials",
"version": "1.0.7",
"version": "1.1.0",
"description": "A essentials module with every important feature the npm community features and some more. Basicially just a big chunk of utils",

@@ -16,3 +16,6 @@ "main": "main.js",

"author": "Constantin",
"license": "ISC"
"license": "ISC",
"dependencies": {
"axios": "^0.19.2"
}
}
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