Skip to content

Commit

Permalink
Merge branch 'develop' 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
iimog committed Apr 10, 2017
2 parents 8ae8246 + d6c2af2 commit facd869
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 16 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -587,6 +587,9 @@ var biomString = biom.toString();

## Changes

### v1.0.8 <small>(2017-04-10)</small>
- Add proper handling of arrays as metadata (replace with empty object, fixes PHPs json decode/encode problem with empty objects)

### v1.0.7 <small>(2017-03-21)</small>
- Add 'Table' to cv for type. Improves interoperability with python tool.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -21,5 +21,5 @@
"test",
"tests"
],
"version": "1.0.7"
"version": "1.0.8"
}
8 changes: 4 additions & 4 deletions build/biom.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions build/biom.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/biojs-io-biom.js
Expand Up @@ -24,7 +24,7 @@ var _ = require('lodash');
* Version
* @type {string} version of this module
*/
var VERSION = exports.VERSION = '1.0.7';
var VERSION = exports.VERSION = '1.0.8';

/**
* Default Biom Object for empty initialization
Expand Down Expand Up @@ -1434,7 +1434,7 @@ var Biom = exports.Biom = function () {
if (typeof row.id === 'undefined') {
throw new TypeError('every row has to have an id');
}
if (typeof row.metadata === 'undefined' || row.metadata === null) {
if (typeof row.metadata === 'undefined' || row.metadata === null || Array.isArray(row.metadata)) {
row.metadata = {};
}
if (typeof new_id_dict[row.id] !== 'undefined') {
Expand Down Expand Up @@ -1545,7 +1545,7 @@ var Biom = exports.Biom = function () {
if (typeof col.id === 'undefined') {
throw new TypeError('every column has to have an id');
}
if (typeof col.metadata === 'undefined' || col.metadata === null) {
if (typeof col.metadata === 'undefined' || col.metadata === null || Array.isArray(col.metadata)) {
col.metadata = {};
}
if (typeof new_id_dict[col.id] !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "biojs-io-biom",
"description": "Parses biom files",
"version": "1.0.7",
"version": "1.0.8",
"homepage": "https://github.com/molbiodiv/biojs-io-biom",
"author": {
"name": "Markus J. Ankenbrand",
Expand Down
6 changes: 3 additions & 3 deletions src/biojs-io-biom.js
Expand Up @@ -12,7 +12,7 @@ const _ = require('lodash');
* Version
* @type {string} version of this module
*/
export const VERSION = '1.0.7';
export const VERSION = '1.0.8';

/**
* Default Biom Object for empty initialization
Expand Down Expand Up @@ -312,7 +312,7 @@ export class Biom {
if (typeof row.id === 'undefined') {
throw new TypeError('every row has to have an id');
}
if (typeof row.metadata === 'undefined' || row.metadata === null) {
if (typeof row.metadata === 'undefined' || row.metadata === null || Array.isArray(row.metadata)) {
row.metadata = {};
}
if (typeof new_id_dict[row.id] !== 'undefined') {
Expand Down Expand Up @@ -375,7 +375,7 @@ export class Biom {
if (typeof col.id === 'undefined') {
throw new TypeError('every column has to have an id');
}
if (typeof col.metadata === 'undefined' || col.metadata === null) {
if (typeof col.metadata === 'undefined' || col.metadata === null || Array.isArray(col.metadata)) {
col.metadata = {};
}
if (typeof new_id_dict[col.id] !== 'undefined') {
Expand Down

0 comments on commit facd869

Please sign in to comment.