Comparing version 0.1.1 to 0.1.2
@@ -97,13 +97,18 @@ 'use strict'; | ||
Object.keys(attrs).forEach(function (attName) { | ||
if (attName === 'fc-content') { | ||
if (attName === 'fc-key') { | ||
fcOpts.append('\'key\', ' + (0, _utils.interpolate)(attrs[attName], options)); | ||
} else if (attName === 'fc-content') { | ||
fcOpts.append('\'content\', true'); | ||
} else { | ||
var _name = attName; | ||
var destination = fcAttrs; | ||
var index = attName.indexOf(options.propNamePrefix); | ||
if (index > -1) { | ||
_name = (0, _utils.toCamelCase)(attName.substring(index + 1)); | ||
destination = fcProps; | ||
} | ||
destination.append('\'' + _name + '\', ' + (0, _utils.interpolate)(attrs[attName], options)); | ||
} | ||
var index = attName.indexOf(options.propNamePrefix); | ||
var name = attName; | ||
var destination = fcAttrs; | ||
if (index > -1) { | ||
name = (0, _utils.toCamelCase)(attName.substring(index + 1)); | ||
destination = fcProps; | ||
} | ||
destination.append('\'' + name + '\', ' + (0, _utils.interpolate)(attrs[attName], options)); | ||
}); | ||
@@ -110,0 +115,0 @@ if (options.selfClosingElements.indexOf(name) > -1) { |
{ | ||
"name": "funclate", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A 'build time' HTML parser + a 'runtime' template engine to patch the DOM incrementally.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -77,13 +77,18 @@ import htmlparser2 from 'htmlparser2'; | ||
Object.keys(attrs).forEach(attName => { | ||
if (attName === 'fc-content') { | ||
if (attName === 'fc-key') { | ||
fcOpts.append(`'key', ${interpolate(attrs[attName], options)}`); | ||
} else if (attName === 'fc-content') { | ||
fcOpts.append(`'content', true`); | ||
} else { | ||
let name = attName; | ||
let destination = fcAttrs; | ||
const index = attName.indexOf(options.propNamePrefix); | ||
if (index > -1) { | ||
name = toCamelCase(attName.substring(index + 1)); | ||
destination = fcProps; | ||
} | ||
destination.append(`'${name}', ${interpolate(attrs[attName], options)}`); | ||
} | ||
const index = attName.indexOf(options.propNamePrefix); | ||
let name = attName; | ||
let destination = fcAttrs; | ||
if (index > -1) { | ||
name = toCamelCase(attName.substring(index + 1)); | ||
destination = fcProps; | ||
} | ||
destination.append(`'${name}', ${interpolate(attrs[attName], options)}`); | ||
}); | ||
@@ -90,0 +95,0 @@ if (options.selfClosingElements.indexOf(name) > -1) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
559749
10718