UNPKG
@eckidevs/payfastjs
Version:
latest (0.1.3)
0.1.3
0.1.2
0.1.1
0.1.0
A Node.js implementation of the PayFast API.
github.com/Eckhardt-D/payfastjs
Eckhardt-D/payfastjs
@eckidevs/payfastjs
/
src
/
utils
/
CSV2JSON.js
11 lines
(9 loc)
•
252 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
csv =
require
(
"csvtojson"
);
module
.
exports
=
function
(
inputCSV
) {
return
new
Promise
(
(
resolve, reject
) =>
{
csv
({
output
:
"json"
}) .
fromString
(inputCSV) .
then
(resolve) .
catch
(
() =>
resolve
(inputCSV)); }); };