This is a playground
to test code. It runs a full Node.js
environment and already has all of npm
’s 1,000,000+ packages pre-installed, including cdyne-address
with all npm
packages installed. Try it out:
var CdyneAddress = require('cdyne-address');
// Create an instance with your license key
var client = new CdyneAddress('000');
// Primary Line (with misspelling), Secondary Line, City, State, Zip
client.verifyAddress('111 Grandby St', '', 'Norfolk', 'VA', '23510', {
ReturnGeoLocation: true, // include lat/long in response
}, function(error, data) {
if (error) {
console.error(error)
}
console.log('Corrected Address: ' + data.PrimaryDeliveryLine);
console.log(data.PreferredCityName + ', ' + data.StateAbbreviation + ' ' + data.ZipCode);
if (data.GeoLocationInfo) {
console.log(data.GeoLocationInfo.AvgLatitude + ', ' + data.GeoLocationInfo.AvgLongitude)
}
console.log(data);
});
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.