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

featureservice

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

featureservice - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

dist/featureservice.map.json

5

CHANGELOG.md

@@ -5,2 +5,6 @@ # Change Log

## [0.0.3] - 2015-07-28
### Fixed
* A change made in v0.0.2 broke pagination. Its now fixed and a test for pages was added.
## [0.0.2] - 2015-07-27

@@ -19,4 +23,5 @@ ### Added

[0.0.3]: https://github.com/chelm/featureservice/ompare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/chelm/featureservice/ompare/v0.0.1...v0.0.2
[0.0.1]: https://github.com/chelm/featureservice/releases/tag/v0.0.1

5

index.js
// A module designed to talk to feature services and get every feature
// this code will expose methods for getting the URL to each page
// var request = require('browser-request')
var queue = require('async').queue

@@ -154,3 +153,3 @@ var http = require('http')

this.featureCount(function (err, count) {
this.featureCount(function (err, json) {
if (err) {

@@ -160,2 +159,4 @@ return callback(err)

var count = json.count
if (count === 0) {

@@ -162,0 +163,0 @@ return callback('Service returned a count of zero')

4

package.json
{
"name": "featureservice",
"description": "a node module meant to extract every feature from an Esri geo-service thing",
"version": "0.0.2",
"version": "0.0.3",
"author": "Chris Helm",

@@ -38,4 +38,4 @@ "bugs": {

"test": "standard index.js && tape test/*.js | tap-spec",
"build": "browserify -d index.js -s FeatureService -p [minifyify --map featureservice.map.json --output featureservice.map.json] > dist/featureservice.min.js"
"build": "browserify -d index.js -s FeatureService -p [minifyify --map featureservice.map.json --output dist/featureservice.map.json] > dist/featureservice.min.js"
}
}

@@ -43,2 +43,20 @@ # featureservice

## Browser
A browser ready build of this module is in `dist/featureservice.min.js` and is built via the command `npm run build`
Example
```html
<html>
<script src="dist/featureservice.min.js"></script>
<script>
var service = new FeatureService('http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/0', {})
service.statistics('id', ['max'], function (err, stats) {
console.log(err, stats)
})
</script>
</html>
```
## Todo

@@ -45,0 +63,0 @@

@@ -41,2 +41,12 @@ var sinon = require('sinon')

test('builds pages for the service', function (t) {
var url = 'http://maps.indiana.edu/ArcGIS/rest/services/Infrastructure/Railroads_Rail_Crossings_INDOT/MapServer'
var indiana = new FeatureService(url, {})
indiana.pages(function (err, pages) {
t.equal(err, null)
t.equal(pages.length, 156)
t.end()
})
})
test('stub setup', function (t) {

@@ -79,2 +89,1 @@ sinon.stub(service, 'request', function (url, callback) {

})
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