Comparing version 0.5.3 to 0.5.4
@@ -109,2 +109,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.deku = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _require=="function"&&_require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _require=="function"&&_require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_require,module,exports){ | ||
onDrop: 'drop', | ||
onError: 'error', | ||
onFocus: 'focus', | ||
@@ -1504,6 +1505,7 @@ onInput: 'input', | ||
function stringify (component, optProps) { | ||
function stringify (component, optProps, children) { | ||
var propTypes = component.propTypes || {} | ||
var props = defaults(optProps || {}, component.defaultProps || {}) | ||
var state = component.initialState ? component.initialState(props) : {} | ||
props.children = children; | ||
@@ -1553,3 +1555,3 @@ for (var name in propTypes) { | ||
return str | ||
case 'component': return stringify(node.type, node.attributes) | ||
case 'component': return stringify(node.type, node.attributes, node.children) | ||
} | ||
@@ -1604,3 +1606,13 @@ | ||
var valueType = type(value) | ||
return (valueType === 'string' || valueType === 'boolean' || valueType === 'number') | ||
switch (valueType) { | ||
case 'string': | ||
case 'number': | ||
return true; | ||
case 'boolean': | ||
return value; | ||
default: | ||
return false; | ||
} | ||
} | ||
@@ -1607,0 +1619,0 @@ |
0.5.4 / 2015-08-14 | ||
================== | ||
* Merge pull request #232 from dekujs/stringify/empty-attrs | ||
* properly handling empty attrs, with tests to prevent regression | ||
* Merge pull request #231 from dekujs/stringify/no-children | ||
* fixing stringify for components with children | ||
* Update events.js | ||
0.5.3 / 2015-08-12 | ||
@@ -3,0 +12,0 @@ ================== |
@@ -21,2 +21,3 @@ /** | ||
onDrop: 'drop', | ||
onError: 'error', | ||
onFocus: 'focus', | ||
@@ -23,0 +24,0 @@ onInput: 'input', |
@@ -22,6 +22,7 @@ var defaults = require('object-defaults') | ||
function stringify (component, optProps) { | ||
function stringify (component, optProps, children) { | ||
var propTypes = component.propTypes || {} | ||
var props = defaults(optProps || {}, component.defaultProps || {}) | ||
var state = component.initialState ? component.initialState(props) : {} | ||
props.children = children; | ||
@@ -71,3 +72,3 @@ for (var name in propTypes) { | ||
return str | ||
case 'component': return stringify(node.type, node.attributes) | ||
case 'component': return stringify(node.type, node.attributes, node.children) | ||
} | ||
@@ -122,3 +123,13 @@ | ||
var valueType = type(value) | ||
return (valueType === 'string' || valueType === 'boolean' || valueType === 'number') | ||
switch (valueType) { | ||
case 'string': | ||
case 'number': | ||
return true; | ||
case 'boolean': | ||
return value; | ||
default: | ||
return false; | ||
} | ||
} |
{ | ||
"name": "deku", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "dekujs/deku", |
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
123617
3518