Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cardboard

Package Overview
Dependencies
Maintainers
39
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cardboard - npm Package Compare versions

Comparing version 0.13.1 to 0.14.0

9

index.js

@@ -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.

4

package.json
{
"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();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc