crypttp-parser
Advanced tools
Comparing version 0.0.1 to 0.0.2
15
index.js
@@ -7,2 +7,4 @@ const atob = require('atob') | ||
"id":"merchantId", | ||
"successUrl": "successUrl", | ||
"errorUrl": "errorUrl", | ||
"params":[ | ||
@@ -15,4 +17,2 @@ [ | ||
"memo if required", | ||
"success url", | ||
"error url" | ||
], | ||
@@ -29,3 +29,12 @@ [ | ||
module.exports = function (url) { | ||
return JSON.parse(atob(url.split("params=")[1])) | ||
let source = JSON.parse(atob(url.split("params=")[1])) | ||
source.params.map((el) => { | ||
if (source.successUrl === undefined && source.errorUrl === undefined) { | ||
source.successUrl = el[5] | ||
source.errorUrl = el[6] | ||
} | ||
el.splice(5, 6) | ||
}) | ||
return source | ||
} |
{ | ||
"name": "crypttp-parser", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"scripts": {}, | ||
"author": "", | ||
@@ -10,0 +8,0 @@ "license": "ISC", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
1914
34
2