
Research
SAP CAP npm Packages Hit by Mini Shai-Hulud Supply Chain Attack
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.
template-bind-helpers
Advanced tools
Bind the current instance of a Templates-based application to an object of helpers, allowing them to be passed to a different render method.
Bind the current instance of a Templates-based application to an object of helpers, allowing them to be passed to a different render method.
Install with npm
$ npm i template-bind-helpers --save
Bind helper functions to app so that, when the helper is called, the this keyword is set to the provided instance of app.
Params
app {Object}: Instance of any [Templates-based][templates] application, such as verb, assemble or generateview {Object}: The view being compiled or renderedlocals {Object}: Context object with helpers to bind. This is usually the options object.isAsync {Boolean}returns {Object}Example
var bindHelpers = require('{%= name %}');
var str = '<%= replace("foo", "bar") %>';
opts = bindHelpers(this.app, opts, true);
// pass opts to a render method as context
app.render(str, opts, function(err, result) {
console.log(result);
});
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb on December 11, 2015.
FAQs
Bind the current instance of a Templates-based application to an object of helpers, allowing them to be passed to a different render method.
The npm package template-bind-helpers receives a total of 360 weekly downloads. As such, template-bind-helpers popularity was classified as not popular.
We found that template-bind-helpers 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.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.