
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Parse meta Markdown data and render in the browser or server. You can add meta data in the format of
Optional Heading
================
title: page1.md
tags: test
The two newlines preceding this paragraph are important.
and automatically parse it out before rendering the markdown.
npm install metamd
<script type="text/javascript" src="metamd.client.min.js"></script>
var fs = require('fs');
var metamd = require('metamd');
var parsed = metamd.parse(fs.readFileSync('./example/page1.md', 'utf-8'));
console.log(parsed);
console.log(metamd.render(parsed.body));
Will result in:
> { title: 'page1.md',
tags: 'test',
body: 'Page 1\n=\n\nThis is a _test_.\n\n```\nThis is another test\n```' }
> <h1>Page 1
</h1>
<p>This is a <em>test</em>.
</p>
<pre><code>This is another test</code></pre>
metamd(<markdown>, [opts])
- returns an object with meta data and the markdown rendered in the body
key. opts
can be an object. Right now the only option is render
which defaults to true
.
metamd.parse(<markdown>)
- returns an object with meta data and the markdown body. The body
key contains the markdown.
metamd.render(<markdown>)
- returns html rendered using marked.
Meta data keys should be alphanumneric plus underscores. Nothing else will be parsed.
Testing is done with mocha and chai and can be run on the server or client. Remember to install the dev dependencies before running the tests.
npm test
Maybe start a server, then navigate to test/browser/index.html
.
If you make changes, you need to recompile for browser usage. After you install the dev dependencies, it's easy:
npm run compile
FAQs
Parse out meta data from your markdown content
The npm package metamd receives a total of 4 weekly downloads. As such, metamd popularity was classified as not popular.
We found that metamd 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.