README
Validation Latitude & Longtitude
What this package does? π€
Tiny package for validating latitude & longitude string format.
/* example */
const isValidStrings = ["40.6892", "74.0445"];
validationLatitudeLongitude.latLong(...isValidStrings); // true π½
Results π
- Valid Latitude and/or Longitude returns
true
. - Invalid returns
false
.
Size π¬
Less-than < 1.5 kilobytes
OK! Lets Get Started π₯
Npm or Yarn installion
npm install validation-latitude-longitude
yarn add validation-latitude-longitude
Import Module π¦
import { validationLatitudeLongitude } from "validation-latitude-longitude";
Methods βοΈ
/* Valid Latitude Format? */
validationLatitudeLongitude.latitude(MY_LATITUDE);
/* Valid Longitude Format? */
validationLatitudeLongitude.longitude(MY_LONGITUDE);
/* Valid Latitude & Longitude Formats? */
validationLatitudeLongitude.latLong(MY_LATITUDE, MY_LONGITUDE);
The End ποΈ

We could use your help! Please share your experience & code if you got a solution π οΈto a unique problem π. The community needs your support! β€οΈ
Working with npm packages
*** New package
- Setup an npm account. (if not done aleardy)
- Create a
package.json
(snippet below) at application root and set version1.0.0
to start. *** If open source, set the license toMIT
. π€ - Push changes to your git repo.
npm login
npm publish
{
"name": "unique-npm-project-name",
"version": "1.0.0",
"description": "Descripton of my application",
"main": "index.min.js",
"license": "MIT",
"keywords": ["list", "of", "searchable", "key", "words"]
}
*** update package
- Push changes to your git repo
npm login
npm version
with new numbernpm publish
# updating version example
npm verison 1.0.1
*** am i still logged in?
npm whoami