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

react-entity

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-entity - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

{
"name": "react-entity",
"version": "1.0.3",
"version": "1.0.4",
"description": "Create entities base on React propTypes",

@@ -5,0 +5,0 @@ "main": "lib/ReactEntity.js",

@@ -35,7 +35,6 @@ const createGetterAndSetter = function (instance, field){

for(var field in this.data){
if (this.data[field].fetch){
rawData[field] = this.data[field].fetch;
}else{
rawData[field] = this.data[field]
}
rawData[field] = this.fetchChild(this.data[field])
}

@@ -47,2 +46,15 @@

fetchChild(fieldValue){
if (Array.isArray(fieldValue)){
return fieldValue = fieldValue.map(fetchChild)
}
if (fieldValue.fetch){
return fieldValue.fetch;
}
return fieldValue
}
validateField(field) {

@@ -49,0 +61,0 @@ const type = typeof(this.schema[field]) === 'function' ?