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

tag2content

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tag2content - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

14

lib/utils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var camelCase = require("camelcase");
exports.getVariables = function (text) {

@@ -9,4 +8,4 @@ var variables = {};

while ((temp = regExp.exec(text))) {
var name_1 = camelCase(temp[1]);
var value = getTransformedValue(temp[2]);
var name_1 = toCamelCase(temp[1]);
var value = toBooleanOrString(temp[2]);
variables[name_1] = value;

@@ -16,3 +15,3 @@ }

};
var getTransformedValue = function (value) {
var toBooleanOrString = function (value) {
switch (value) {

@@ -27,1 +26,8 @@ case 'true':

};
var toCamelCase = function (text) {
return text
.replace(/(?:^\w|[A-Z]|\b\w)/g, function (letter, index) {
return index === 0 ? letter.toLowerCase() : letter.toUpperCase();
})
.replace(/[_.\-\s]+/g, '');
};
{
"name": "tag2content",
"version": "1.0.3",
"version": "1.0.4",
"description": "Replace a tag with content in a configurable way",

@@ -16,3 +16,3 @@ "main": "lib/index.js",

"test": "jest --config jestconfig.json",
"test-watch": "npm run test -- --watch",
"test:watch": "npm run test -- --watch",
"version": "npm run format && git add -A src"

@@ -43,5 +43,3 @@ },

"dependencies": {
"@types/camelcase": "^4.1.0",
"@types/node": "^10.12.15",
"camelcase": "^5.0.0",
"escape-string-regexp": "^1.0.5"

@@ -48,0 +46,0 @@ },

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