Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "template", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": [ | ||
@@ -5,0 +5,0 @@ "index.js" |
@@ -33,3 +33,3 @@ /* | ||
var opts = _.extend({}, defaults, options); | ||
var settings = {variable: opts.namespace || ''}; | ||
var settings = _.extend({variable: opts.namespace}, opts.settings); | ||
var original = text; | ||
@@ -39,6 +39,7 @@ | ||
if (opts.delims) { | ||
// Extend settings with custom delimiters | ||
settings = _.extend(settings, delim(opts.delims, opts)); | ||
// Inspired by grunt.template | ||
while (text.indexOf(opts.delims[0]) >= 0) { | ||
text = _.template(text, data, delim(opts.delims, opts)); | ||
text = _.template(text, data, settings); | ||
if (text === original) {break;} | ||
@@ -56,2 +57,3 @@ } | ||
// Read files and process any templates therein | ||
@@ -58,0 +60,0 @@ template.read = function(text, data, options) { |
{ | ||
"name": "template", | ||
"description": "An easy-to-use utility library for processing Lo-dash templates.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/jonschlinkert/template", | ||
@@ -6,0 +6,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14619
246