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

@ministryofjustice/fb-nunjucks-helpers

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ministryofjustice/fb-nunjucks-helpers - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

lib/fb-nunjucks-helpers.js

@@ -8,3 +8,3 @@ const nunjucksMacroHelpers = require('./nunjucks-macro-helpers')

nunjucksEnv.addFilter('addBlockInfo', (str, params) => {
const output = str.replace(/(<div[^>]+)/, `$1 data-block-id="${params._id}" data-block-type="${params._type}"`)
const output = str.replace(/\s*(<\w+[^>]+)/, `$1 data-block-id="${params._id}" data-block-type="${params._type}"`)
.replace(/(govuk-form-group)/, `$1 fb-block-${params._type}`)

@@ -11,0 +11,0 @@ return output

@@ -42,3 +42,4 @@

// let macroNjk = macroPath.replace(/.*\/template\/nunjucks\/(.+)\.njk?$/, '$1')
let macroNjk = macroPath.replace(/.*\/(.+)\.njk?$/, '$1')
// let macroNjk = macroPath.replace(/.*\/(.+)\.njk?$/, '$1')
let macroNjk = macroPath.replace(/.*\/(.+)\.njk$/, '$1')
const macroNamespaceSuffix = macroNjk.includes('.') ? macroNjk.replace(/\.[^.]+$/, '') : ''

@@ -45,0 +46,0 @@ if (macroNamespaceSuffix) {

{
"name": "@ministryofjustice/fb-nunjucks-helpers",
"version": "0.0.3",
"version": "0.0.4",
"description": "Form Builder Nunjucks helpers",

@@ -5,0 +5,0 @@ "main": "lib/fb-nunjucks-helpers.js",

Sorry, the diff of this file is not supported yet

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