@tpluscode/rdfine
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.2.10](https://github.com/tpluscode/rdfine/compare/v0.2.9...v0.2.10) (2020-01-27) | ||
### Bug Fixes | ||
* initial property value does not work with array properties ([c400565](https://github.com/tpluscode/rdfine/commit/c400565d61d99a4daf296a24fc9bbe5b645e95eb)) | ||
### [0.2.9](https://github.com/tpluscode/rdfine/compare/v0.2.8...v0.2.9) (2020-01-26) | ||
@@ -7,0 +14,0 @@ |
@@ -26,3 +26,6 @@ import cf from 'clownface'; | ||
defaults.forEach((value, key) => { | ||
if (typeof self[key] !== 'undefined') { | ||
const currentValue = self[key]; | ||
const valueIsEmptyArray = Array.isArray(currentValue) && currentValue.length === 0; | ||
const valueIsUndefined = typeof currentValue === 'undefined'; | ||
if (!(valueIsEmptyArray || valueIsUndefined)) { | ||
return; | ||
@@ -29,0 +32,0 @@ } |
@@ -31,3 +31,6 @@ "use strict"; | ||
defaults.forEach((value, key) => { | ||
if (typeof self[key] !== 'undefined') { | ||
const currentValue = self[key]; | ||
const valueIsEmptyArray = Array.isArray(currentValue) && currentValue.length === 0; | ||
const valueIsUndefined = typeof currentValue === 'undefined'; | ||
if (!(valueIsEmptyArray || valueIsUndefined)) { | ||
return; | ||
@@ -34,0 +37,0 @@ } |
@@ -13,3 +13,3 @@ import { Term } from 'rdf-js'; | ||
} | ||
export declare type ObjectOrFactory<R, T> = T | ((self: R) => T); | ||
export declare type ObjectOrFactory<R, T> = T | T[] | ((self: R) => T | T[]); | ||
interface PropertyDecoratorOptions<T, N> extends AccessorOptions { | ||
@@ -16,0 +16,0 @@ fromTerm: (this: RdfResource, obj: SingleContextClownface) => unknown; |
{ | ||
"name": "@tpluscode/rdfine", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "RDF/JS idiomatic, native, enjoyable", | ||
@@ -5,0 +5,0 @@ "main": "dist/node/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
72430
1212