Socket
Socket
Sign inDemoInstall

formatic

Package Overview
Dependencies
Maintainers
3
Versions
223
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formatic - npm Package Compare versions

Comparing version 0.2.27 to 0.2.28

13

build/lib/components/helpers/tag-translator.js
'use strict';
var _ = require('underscore');
// Constant for first unused special use character.

@@ -12,11 +10,6 @@ // See IMPLEMENTATION NOTE in pretty-text2.js.

// Zapier specific stuff. Make a plugin for this later.
function removeIdPrefix(key) {
return String(key).replace(/^[0-9]+__/, '');
}
function buildChoicesMap(replaceChoices) {
var choices = {};
replaceChoices.forEach(function (choice) {
var key = removeIdPrefix(choice.value);
var key = choice.value;
choices[key] = choice.label;

@@ -72,3 +65,2 @@ });

encodeTag: function encodeTag(tag) {
tag = removeIdPrefix(tag);
if (!tagToCharMap[tag]) {

@@ -88,3 +80,2 @@ var char = String.fromCharCode(nextCharCode++);

return String(value).replace(TAGS_REGEXP, (function (m, tag) {
tag = removeIdPrefix(tag);
return this.encodeTag(tag);

@@ -121,3 +112,2 @@ }).bind(this));

var tag = mustache.replace('{{', '').replace('}}', '');
tag = removeIdPrefix(tag);
var label = this.getLabel(tag);

@@ -133,3 +123,2 @@ return '<span class="pretty-part">' + label + '</span>';

getLabel: function getLabel(tag) {
tag = removeIdPrefix(tag);
var label = choices[tag];

@@ -136,0 +125,0 @@ if (!label) {

2

package.json
{
"name": "formatic",
"version": "0.2.27",
"version": "0.2.28",
"description": "Automatic, pluggable form generation",

@@ -5,0 +5,0 @@ "main": "./build/lib/formatic",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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