UNPKG
transfr
Version:
latest (1.1.0)
1.1.0
1.0.1
1.0.0
A Node CLI to upload files with https://transfer.sh/
github.com/adambrgmn/transfr
adambrgmn/transfr
transfr
/
index.js
10 lines
(8 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
const
path =
require
(
'path'
);
const
putFile =
require
(
'./lib/putFile'
);
module
.
exports
=
function
transfr
(
fileName
) {
const
filePath = path.
resolve
(fileName);
putFile
(filePath) .
then
(
link
=>
console
.
log
(link)) .
catch
(
err
=>
console
.
error
(err)); };