Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
An easy-to-use Lo-Dash template processing library.
Install with npm:
npm i template --save
By default the template()
method expects the following parameters:
template(text, data, [options])
For example, the following:
var template = require('template');
template('Name: <%= name %>', {name: 'Jon'});
results in:
Name: Jon
To read a file from the file system before processing, use template.read
:
template.read('file.md', data, options);
A convenience method for synchronously copying files from A to B.
template.copy(src, dest, data, options);
Pass {process: false}
to the options disable template processing.
All of the options from the delims library may be passed to the options object.
For example, this:
template('Hi, my name is {%= name %}', {name: 'Jon Schlinkert'}, {delims: ['{%', '%}']});
Results in:
Hi, my name is Jon Schlinkert
Any of the following expressions may be used in templates:
// Strings
"foo"
// Property strings
foo
foo.bar
foo.bar.baz
// Method calls, passed as properties on the data object
one()
two.three()
// Lo-Dash Mixins
_.foo()
_.foo(bar)
_.foo("baz")
All of the methods from underscore.string are available on the _.str
object. Additionally, all of the non-conflicting methods are available on the _
Lo-Dash namespace. See the underscore.string documentation for more details.
Jon Schlinkert
Brian Woodward
Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors. Released under the MIT license
FAQs
Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template helpers, middleware, routes, loaders, and lots more. Powers assemble, verb and other node.js apps.
The npm package template receives a total of 0 weekly downloads. As such, template popularity was classified as not popular.
We found that template demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.