UNPKG
pt.md
Version:
latest (1.0.1)
1.0.1
1.0.0
Library for working with https://pt.md
github.com/AlexanderC/pt.md
AlexanderC/pt.md
pt.md
/
src
/
helper
/
debug.js
10 lines
(7 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
const
debug =
require
(
'debug'
);
const
path =
require
(
'path'
);
const
pkg =
require
(
'../../package.json'
);
module
.
exports
=
(
filename
) =>
{
const
namespace = path.
basename
(filename,
'.js'
);
return
(
...args
) =>
debug
(
`
${pkg.name}
:
${namespace}
`
)(...args); };