Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Monkberry is blazingly fast, small 1kb
and simple JavaScript library for building web user interfaces.
Monkberry comes with powerfull templating engine, which is compiled to JavaScript.
<ol>
{% for todos %}
<li>
{% if complete %}
<del>{{ text }}</del>
{% else %}
<em>{{ text }}</em>
{% endif %}
</li>
{% endfor %}
</ol>
and then
import Monkberry from 'monkberry';
import Template from 'template.monk';
const view = Monkberry.render(Template, document.body);
view.update({todos: [...]});
1kb
minified & gzippedDocumentation available on monkberry.js.org site.
If you want to hack on Monkberry, the first step is to fork the repo.
# Build compiler
npm run build
# Build parser
npm run build:parser
# Watch changes and rebuild
npm run watch
# Start tests server
testem
Why is Monkberry so fast? Even in comparison with React, Monkberry is 10 times faster, sometimes 100 times faster. It's because Monkberry will do only necessary dom updates, and does it in a completely different way than React does. Monkberry compiles template to plain JavaScript to gain an advantage by using v8 hidden classes and reduce call stack. There is no virtual dom (in general, an react app have to keep 3 virtual doms), for example next template will be generated to JavaScript code which will do only necessary dom updates on state changes.
<div>
...
<h1>{{ title }}</h1>
...
</div>
Will be compiled to code like this:
function (state) {
h1.textContent = state.title;
}
Benchmarks covers a few use cases and compares Monkberry with React and innerHTML. Also, it contains real site code and data.
The MIT License (MIT) Copyright © 2016 Medvedev Anton
FAQs
Monkberry is a JavaScript library for building web user interfaces
The npm package monkberry receives a total of 445 weekly downloads. As such, monkberry popularity was classified as not popular.
We found that monkberry 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.