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

config-templator

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

config-templator - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

1

Gruntfile.js

@@ -49,2 +49,3 @@ 'use strict';

grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-release');

@@ -51,0 +52,0 @@ // Default task.

12

lib/config-templator.js

@@ -21,2 +21,8 @@ /*

var cleanValue = function (value) {
if (value == 'false') value = false;
else if (value == 'true') value = true;
return value;
};
var processRaw = function (raw, origin) {

@@ -42,3 +48,3 @@ if (!origin) {

if (matches) {
result = namespace.get(origin, matches[1]);
result = cleanValue(namespace.get(origin, matches[1]));
// If the result retrieved from the data wasn't null or undefined,

@@ -53,7 +59,7 @@ // return it.

// If the replacment would not be catch by the simple RegExp above, try with EJS.
var transformed = ejs.render(value, origin);
var transformed = cleanValue(ejs.render(value, origin));
// If the strings are differents, a replacement happened.
hasReplacment = hasReplacment || (transformed !== value);
return transformed;

@@ -60,0 +66,0 @@ });

{
"name": "config-templator",
"version": "0.0.5",
"version": "0.0.6",
"description": "Dynamic replacement in object, inspired by GruntJS config",

@@ -31,4 +31,5 @@ "homepage": "https://github.com/loicmahieu/config-templator",

"grunt-contrib-watch": "~0.5.0",
"chai": "~1.7.2"
"chai": "~1.7.2",
"grunt-release": "~0.7.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