4.0.0 • Published 5 years ago
geolocation-infos v4.0.0
npm-geolocation
This repository implements the solution for taking phones from api.
1. How to import
- Use in gulp
gulp.task("geolocation", function () {
gulp.src('./node_modules/npm-geolocation/dist/index.min.js')
.pepe(gulp.concat('geolocation.js'))
.pipe(gulp.dest("dist/");
});
- Or any other...
2. How to use
- Instance new object:
This change the .header__phone for the formated Phone and .header__phone_link for 'tel:number'.
const url = '...';
const geolocation = new GeolocationPhone(url, 'name');
- If you need the whatsapp number use:
const whatsapp = geolocation.getWhats();