cardboard
Advanced tools
Comparing version 0.13.1 to 0.14.0
@@ -38,10 +38,3 @@ var through = require('through2'); | ||
var featureCollection = geojsonNormalize(featureCollection); | ||
// reject nested objects | ||
for (var i = 0; i < featureCollection.features.length; i++) { | ||
for (var prop in featureCollection.features[i].properties) { | ||
if (typeof featureCollection.features[i].properties[prop] === 'object') { | ||
return callback(new Error('Does not support nested objects')); | ||
} | ||
} | ||
} | ||
// if the feature is an update, check upfront that they exist, we can fail them | ||
@@ -48,0 +41,0 @@ // early. |
{ | ||
"name": "cardboard", | ||
"version": "0.13.1", | ||
"version": "0.14.0", | ||
"description": "A library for storing and searching geographic features", | ||
@@ -35,3 +35,3 @@ "main": "index.js", | ||
"dyno": "0.11.0", | ||
"geobuf": "0.2.3", | ||
"geobuf": "0.2.4", | ||
"geojson-extent": "^0.1.0", | ||
@@ -38,0 +38,0 @@ "geojson-normalize": "0.0.0", |
@@ -185,4 +185,15 @@ var test = require('tap').test, | ||
"properties": { | ||
"prop0": "0", | ||
"prop1": { "nested": "object"} | ||
"string": "0", | ||
"int": 0, | ||
"null": null, | ||
"array": ['a', 'b', 'c'], | ||
"object": { | ||
"string": "0", | ||
"int": 0, | ||
"null": null, | ||
"array": ['a', 'b', {'foo': 'bar'}], | ||
"object": { | ||
"enough": "recursion" | ||
} | ||
} | ||
}, | ||
@@ -193,5 +204,9 @@ "type": "Feature" | ||
cardboard.put(d, 'default', function(err, res) { | ||
t.ok(err, 'should return an error'); | ||
t.equal(err.message, 'Does not support nested objects'); | ||
t.end(); | ||
t.ifError(err, 'inserted without error'); | ||
cardboard.get(res, 'default', function(err, data) { | ||
t.ifError(err, 'got item'); | ||
d.id = res; | ||
t.deepEqual(data, geojsonNormalize(geobuf.geobufToFeature(geobuf.featureToGeobuf(d).toBuffer()))); | ||
t.end(); | ||
}); | ||
}); | ||
@@ -198,0 +213,0 @@ }); |
@@ -37,3 +37,2 @@ var test = require('tap').test, | ||
q.awaitAll(function(err, resp){ | ||
console.log(err) | ||
t.notOk(err); | ||
@@ -40,0 +39,0 @@ t.end(); |
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
346727
2208
+ Addedgeobuf@0.2.4(transitive)
- Removedgeobuf@0.2.3(transitive)
Updatedgeobuf@0.2.4