Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
balena-temen
Advanced tools
Templating engine for (not just) JSON
A templating engine for JSON.
Provides facilities to:
balena-temen
crate is one small piece of the balena.io configuration project. This project has
no public / open specification yet, but we're working on it and it will be public once finished.
This library is written in the Rust language and can be used:
kwargs
were removed in favor of positional arguments. All functions
and filters do accept positional arguments only.NOW()
function accepts one boolean
argument onlyuuidv4()
-> UUIDV4()
$$eval
keyword was renamed to $$formula
. You can still use $$eval
if you want
by instantiating your own Engine
with the EngineBuilder and
custom eval keyword
registration.
Add as a dependency to your Cargo.toml
:
[dependencies]
balena-temen = "0.1"
Evaluate simple JSON:
use balena_temen::evaluate;
use serde_json::json;
let data = json!({
"wifi": {
"ssid": "Balena Ltd",
"id": {
"$$formula": "super.ssid | slugify"
}
}
});
let evaluated = json!({
"wifi": {
"ssid": "Balena Ltd",
"id": "balena-ltd"
}
});
assert_eq!(evaluate(data).unwrap(), evaluated);
Install via npm
npm install --save balena-temen
Evaluate simple JSON:
const bt = require('balena-temen');
console.log(
bt.evaluate({
"ssid": "Some Cool SSID!",
"id": {
"$$formula": "super.ssid | slugify"
}
})
);
An example of using this module in nodeJS is available in the examples/node
folder:
cd examples/node
npm install
npm start
An example of using this module in the browser is available in the examples/browser
folder:
cd examples/browser
npm install
npm start
Open localhost:8080
in your browser and you should see evaluated JSON in the browser console.
If you're having any problem, please raise an issue on GitHub or contact us, and the balena.io team will be happy to help.
balena-temen
is open source software, and may be redistributed under the terms specified in
the license.
FAQs
Templating engine for (not just) JSON
The npm package balena-temen receives a total of 5 weekly downloads. As such, balena-temen popularity was classified as not popular.
We found that balena-temen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.