Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
A node.js and browser JavaScript client to Mapbox services.
Generally Available
$ npm install --save mapbox
Setup:
var MapboxClient = require('mapbox');
var client = new MapboxClient('YOUR_ACCESS_TOKEN');
Basic usage of the geocoder:
client.geocodeForward('Chester, NJ', function(err, data, res) {
// data is the geocoding result as parsed JSON
// res is the http response, including: status, headers and entity properties
});
As an alternative to callbacks, each method also returns a Promise:
client.geocodeForward('Chester, NJ')
.then(function(res) {
// res is the http response, including: status, headers and entity properties
var data = res.entity; // data is the geocoding result as parsed JSON
})
.catch(function(err) {
// handle errors
});
Listing resources may return a subset of the entire listing. If more pages are
available the res
object will contain a .nextPage()
method. This method
requires no arguments, other than an optional callback function, otherwise a
Promise is returned.
Each service is available as a sub-require if you'd only like to include only
its functionality and not the entire bundle. The returned MapboxClient
will have the same constructor style but only include functions necessary
for that service's support.
Available sub-requires:
require('mapbox/lib/services/geocoding')
require('mapbox/lib/services/surface')
require('mapbox/lib/services/matching')
require('mapbox/lib/services/directions')
require('mapbox/lib/services/distance')
require('mapbox/lib/services/datasets')
require('mapbox/lib/services/styles')
require('mapbox/lib/services/uploads')
require('mapbox/lib/services/tilestats')
require('mapbox/lib/services/static')
require('mapbox/lib/services/tilesets')
require('mapbox/lib/services/tokens')
FAQs
interface to mapbox services
The npm package mapbox receives a total of 8,543 weekly downloads. As such, mapbox popularity was classified as popular.
We found that mapbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 44 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.