
Security News
gem.coop Tests Dependency Cooldowns as Package Ecosystems Move to Slow Down Attacks
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.
a pandoc wrapper for node.js
npm install pdc
This package requires pandoc to be
installed. By default, the wrapper assumes pandoc to be in PATH. You can set
your own, customized path to the executable by assigning an absolute path to
pdc.path.
var pdc = require('pdc');
// optional, if pandoc is not in PATH
var path = require('path');
pdc.path = path.resolve(process.env.HOME, '.cabal/bin/pandoc');
pdc('# Heading', 'markdown', 'html', function(err, result) {
if (err)
throw err;
console.log(result);
});
This will print:
<h1 id="heading">Heading</h1>
pdc(src, from, to, [args,] [opts,] callback);
src is a string containing the entire source text, that shall be
converted.from is a string containing the type of the source text (e.g.
'markdown').to is a string containing the type of the destination text (e.g.
'html').args [optional] is an array with additional command line flags (e.g.
[ '-v' ] for pandoc's version).opts [optional] is an object with additional options for the process. See
the Node.js docs.callback is a function that is called after parsing. It takes two
arguments (err, result), where err is an error or null and result is
a string containing the converted text.pdc.path = 'pandoc';
pdc.path is a string containing the name or absolute path to the
executable. Defaults to 'pandoc'.pdc.stream(from, to, [args,] [opts])
This is an alternative way to run pandoc. If you need a way to manipulate the streams, that's the way to go.
from is a string containing the type of the source text (e.g.
'markdown').to is a string containing the type of the destination text (e.g.
'html').args [optional] is an array with additional command line flags (e.g.
[ '-v' ] for pandoc's version).opts [optional] is an object with additional options for the process. See
the Node.js docs.stdin, stdout
and stderr.If you encounter any bugs or issues, feel free to open an issue at github.
I’d like to thank John MacFarlane for creating such a great tool -- It adds so many possibilities to Markdown -- and of course John Gruber for creating Markdown itself.
Copyright © 2012-2014 Paul Vorbach
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
a pandoc wrapper for node
The npm package pdc receives a total of 44 weekly downloads. As such, pdc popularity was classified as not popular.
We found that pdc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.

Security News
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.