
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
#OMM - Object Markup Mapper# ##An object to markup mapper to keep plain html out of your JavaScript code##
Version 0.9.0
Licensed under the MIT license
This class enables you to create Simple json objects and parse them to HTML Markup at runtime. The currently complete HTML tag reference including their complete attributes is build in this class. It's also possible to extend the given configuration and/or override complete tags with own templates (e.g. for custom attributes or partials).
You can use omm in browser and on server using node.js's require
var Omm = require('omm');
EXAMPLE:
1) Create a link:
new Omm({
A : {
ID : 'myLink',
CLASS : 'a b c',
HREF : '#',
INSERT : 'My first link using this OMM engine'
}
}).toHtml()
Produces:
<a href="#" class="a b c" id="myLink">My first link using this OMM engine</a>
Create a custom template (partial):
var oTpl = new Omm().extTpls({
IMGLINK : '<a href="{IMAGEURL}" class="imagelink" id="{IMGLINKID}"><img scr="{IMAGEURL}" alt="{ALTTEXT}"/></a>'
});
oTpl.setConfig({
IMGLINK : {
IMGLINKID : 'myId',
IMAGEURL : 'url_to_my_image',
ALTTEXT : 'an image'
}
}).toHtml();
Also this type of writing is possible:
new Omm().extTpls({IMGLINK : '<a href="{IMAGEURL}" class="imagelink" id="{IMGLINK}"><img scr="{IMAGEURL}" alt="{ALTTEXT}"/></a>'})
.setConfig({IMGLINK : {IMGLINKID : 'myId',IMAGEURL : 'url_to_my_image',ALTTEXT : 'an image'}})
.toHtml();
Produces:
<a href="url_to_my_image" class="imagelink"><img scr="url_to_my_image" alt="an image"/></a>
FAQs
An oject to markup mapper to keep plain html out of your JavaScript code
We found that omm 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.