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.4 to 0.0.5

4

lib/fb-nunjucks-data-helpers.js

@@ -77,5 +77,5 @@ const Markdown = require('markdown-it')()

}
const widthDelimiter = parseInt(data[prop], 10) > 0 ? 'c-input--width' : '!-width'
const widthDelimiter = parseInt(data[prop], 10) > 0 ? 'input--' : '!-'
data.classes = data.classes ? `${data.classes} ` : ''
data.classes += `govuk-${widthDelimiter}-${data[prop]}`
data.classes += `govuk-${widthDelimiter}width-${data[prop]}`
return data

@@ -82,0 +82,0 @@ }

@@ -153,3 +153,3 @@ const test = require('tape')

})
t.equals(widthClass10.classes, 'govuk-c-input--width-20', 'it should set the character-based classes')
t.equals(widthClass10.classes, 'govuk-input--width-20', 'it should set the character-based classes')

@@ -162,3 +162,3 @@ const widthClassOneThird = classMethod({

const widthClassDefault = classMethod({}, 10)
t.equals(widthClassDefault.classes, 'govuk-c-input--width-10', 'it should use the default if no property is set')
t.equals(widthClassDefault.classes, 'govuk-input--width-10', 'it should use the default if no property is set')

@@ -174,3 +174,3 @@ const widthClassDefaultWithValue = classMethod({

})
t.equals(widthClasses.classes, 'class-value govuk-c-input--width-20', 'it should keep any previous set value of the classes property')
t.equals(widthClasses.classes, 'class-value govuk-input--width-20', 'it should keep any previous set value of the classes property')

@@ -177,0 +177,0 @@ t.end()

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

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

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