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

arcgis-parser

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arcgis-parser - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

CHANGELOG.md
# Changelog
## 1.0.1 - 2017-09-22
- Support HTTP & HTTPS
## 1.0.0 - 2017-09-11
- Finalize beta of ArcGIS Parser

2

package.json
{
"name": "arcgis-parser",
"version": "1.0.0",
"version": "1.0.1",
"description": "Parser for ArcGIS REST Services to human friendly JSON.",

@@ -5,0 +5,0 @@ "main": "index.js",

const https = require('https')
const http = require('http')
const URL = require('url')
const format = require('./format')

@@ -17,4 +19,7 @@

// Support both HTTP & HTTPS
var request = (URL.parse(url).protocol === 'https:') ? request = https : request = http;
return new Promise((resolve, reject) => {
https.get(url, response => {
request.get(url, response => {
if (!response.headers['content-type'].match(/application\/json/i)) return reject('content-type must be application/json')

@@ -21,0 +26,0 @@ var data = ''

@@ -17,3 +17,3 @@ const path = require('path')

t.deepEqual(capabilities, load.sync(output))
})
}).catch(error => t.fail(error))
})

@@ -24,10 +24,21 @@ t.end()

test('get -- string', t => {
test('get -- https', t => {
get('https://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer?f=pjson').then(capabilities => {
t.notDeepEqual(capabilities, {})
})
}).catch(error => t.fail(error))
t.end();
})
test('get -- service', t => {
get({service: 'ESRI_Imagery_World_2D'}).then(capabilities => {
t.notDeepEqual(capabilities, {})
})
}).catch(error => t.fail(error))
t.end()
});
test('get -- http', t => {
get('http://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer?f=pjson').then(capabilities => {
t.notDeepEqual(capabilities, {})
}).catch(error => t.fail(error))
t.end()
})

@@ -34,0 +45,0 @@

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