Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bigcommerce/stencil-paper

Package Overview
Dependencies
Maintainers
14
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bigcommerce/stencil-paper - npm Package Compare versions

Comparing version 2.0.23 to 2.0.24

4

helpers/replace.js
'use strict';
const common = require('../lib/common.js');
function helper(paper) {
paper.handlebars.registerHelper('replace', function (needle, haystack) {
needle = common.unwrapIfSafeString(needle);
haystack = common.unwrapIfSafeString(haystack);
const options = arguments[arguments.length - 1];

@@ -6,0 +10,0 @@

2

package.json
{
"name": "@bigcommerce/stencil-paper",
"version": "2.0.23",
"version": "2.0.24",
"description": "A stencil plugin to register partials and helpers from handlebars and returns the compiled version for the stencil platform.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,2 +17,3 @@ var Code = require('code'),

price: '$49.99',
facet: 'brand',
};

@@ -49,2 +50,9 @@

it('should work nicely with other helpers that use safestring', function(done) {
expect(c("Replace+Concat+Hyphenated: fifth-{{#replace '&' (concat '&' (hyphenate facet)) }}{{/replace}}", context))
.to.be.equal("Replace+Concat+Hyphenated: fifth-brand");
done();
});
it('should gracefully handle not strings', function(done) {

@@ -51,0 +59,0 @@ expect(c("{{#replace something price}}{{/replace}}", context))

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