New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can-stache

Package Overview
Dependencies
Maintainers
16
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-stache - npm Package Compare versions

Comparing version 4.16.0 to 4.17.0

17

helpers/-let-test.js

@@ -71,2 +71,19 @@ var QUnit = require("steal-qunit");

QUnit.test("let blocks allow reassigning variables #645", function(){
var template = stache(
"{{#let foo='bar'}}" +
"<p>{{foo}}</p>" +
"{{/let}}" +
"{{#let foo='baz'}}" +
"<p>{{foo}}</p>" +
"{{/let}}" +
"<p>foo-{{foo}}</p>"
);
var frag = template(new Scope({}));
var paragraphs = frag.querySelectorAll('p');
QUnit.equal( paragraphs[0].innerHTML, "bar", "first value still works");
QUnit.equal( paragraphs[1].innerHTML, "baz", "reassigning foo works");
QUnit.equal( paragraphs[2].innerHTML, "foo-", "foo is not available outside of let block");
});
QUnit.test("let works after calling helpersCore.__resetHelpers", function() {

@@ -73,0 +90,0 @@ helpersCore.__resetHelpers();

3

helpers/-let.js

@@ -8,2 +8,5 @@ var canReflect = require("can-reflect");

var letHelper = function(options){
if(options.isSection){
return options.fn( options.scope.addLetContext( options.hash ) );
}
var variableScope = options.scope.getScope(isVariable);

@@ -10,0 +13,0 @@ if(!variableScope) {

2

package.json
{
"name": "can-stache",
"version": "4.16.0",
"version": "4.17.0",
"description": "Live binding handlebars templates",

@@ -5,0 +5,0 @@ "homepage": "https://canjs.com/doc/can-stache.html",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc