
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Extremely lightweight
Everything is 1.25 kB
(gzip) – even less with tree-shaking!
Super Performant
Significantly faster than the big names; and the small ones.
Familiar Syntax
Tempura templates look great with Handlebars syntax highlighting.
Custom Directives
Easily define custom directives, via the API, to extend functionality.
$ npm install --save tempura
// TODO
TODO
Note: All methods share common Options.
Returns: (data: object) => string
Convert a template into an executable function
equivalent.
This function will produce a string
output based on the data you provide. The data
key names should match the #expect
ed variable names.
Type: string
The template to be converted.
Type: (value: any) => string
todo
Returns: string
Transforms the input
source template into JavaScript code. Unlike tempura.compile()
, this generates a string
instead of a function
, which means that this method is likely only suitable for generating and/or replacing code at build-time.
Type: string
The template to be converted.
Type: "esm"
or "cjs"
Default: "esm"
Modify the generated output to be compliant with the CommonJS or ES Module format.
Note: Most bundlers and/or upstream consumers can understand (and prefer) the ESM format.
Type: string[]
The names of variables that will be provided to a view.
NOTE: Declaring
options.props
names could take the place of{{#expect ...}}
declarataions – and vice versa. In other words,options.props
is a programmatic way to define (or skip){{#expect}}
blocks. Declaring a variable name in both locations has no effect.
Type: { ... }
TODO: extra actions/blocks
Running via Node v14.15.13
Please visit the /bench
directory for complete, reproducible benchmarks.
The following is a subset of the full results, presented without context. Again, please visit /bench
for explanations and/or comparisons.
Benchmark: Render w/ raw values (no escape)
pug x 34,847 ops/sec ±2.79% (93 runs sampled)
handlebars x 6,700 ops/sec ±1.41% (92 runs sampled)
ejs x 802 ops/sec ±0.54% (94 runs sampled)
dot x 40,704 ops/sec ±3.08% (93 runs sampled)
art-template x 39,839 ops/sec ±0.86% (90 runs sampled)
tempura x 44,656 ops/sec ±0.42% (92 runs sampled)
Benchmark: Render w/ escaped values
pug x 2,800 ops/sec ±0.31% (95 runs sampled)
handlebars x 733 ops/sec ±0.34% (94 runs sampled)
ejs x 376 ops/sec ±0.17% (91 runs sampled)
dot x 707 ops/sec ±0.15% (96 runs sampled)
art-template x 2,707 ops/sec ±0.12% (96 runs sampled)
tempura x 2,922 ops/sec ±0.31% (96 runs sampled)
MIT © Luke Edwards
FAQs
A light, crispy, and delicious template engine
The npm package tempura receives a total of 16,112 weekly downloads. As such, tempura popularity was classified as popular.
We found that tempura demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.