![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Ultra-extendable Mustache-ish template engine on steroids in 620 gzipped kilobytes, need nothing more!
Jade-ish + Mustache-ish template engine on steroids in 846 gzipped kilobytes
$ npm install brown
or in the browser:
<script type='text/javascript' src='brown.min.js'></script>
brown.render( "hello {{foo.bar}}", {
foo: {
bar: "world"
}
});
outputs:
hello world
Create a fullfledged template engine by adding functions:
brown.encode = function(key,type) {
var html = this[key] || '';
return type == "html" ?
String(html).replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>') :
html
};
brown.render( 'a href="{{href}}" onclick="{{encode:label:html}}"': "{{label}}", {
href="/",
label:"my \"label\""}
});
outputs:
<div>
<ul>
<li>
<a href="/" onclick="my "label"">my "label"</a>
</li>
</ul>
</div>
Need more? See brown-ext-basic for if/foreach/filter/loop-functionality.
ϐrown can be monkeypatched, to automatically produce xml-trees from json (like JADE), see this coffeescript example:
json =
ul:
li: 'a href="{{foo}}": "Click me"
brown.render json,{ foo: "/" }
outputs:
<ul>
<li>
<a href="/">Click me </a>
</li>
</ul>
How? Simple, by just monkeypatching ϐrown with json-dsl. See coffeescript / JS examples.
Use as a commandline generator (install using npm install -g
) :
$ brown
Usage: brown <string|file> [jsonstring|jsonfile]
examples:
$ brown 'foo {{foo}}' '{"foo":"world"}'
$ brown foo.html data.json
With ϐrown as a fundament you can literally do anything.
FAQs
Ultra-extendable Mustache-ish template engine on steroids in 620 gzipped kilobytes, need nothing more!
The npm package brown receives a total of 4 weekly downloads. As such, brown popularity was classified as not popular.
We found that brown 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.