Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A node.js and browser JavaScript client to Mapbox services.
Generally Available
$ npm install --save mapbox
Setup via node
:
var MapboxClient = require('mapbox');
Setup via script
tag:
<script src='https://unpkg.com/mapbox@1.0.0-beta9/dist/mapbox-sdk.min.js'></script>
Initializing:
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/matrix')
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
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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.