From 1dbafe1fc687f88354d6c98fbbf0d7e4c5b53d43 Mon Sep 17 00:00:00 2001 From: bhaktipatel5100 <135109289+bhaktipatel5100@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:02:17 +0530 Subject: [PATCH] Update README.md added styling and if you are using NPM --- README.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3669c1..6ecb8a6 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,30 @@ Javascript - find address by postcode. npm install getaddress-find ``` ### Or CDN -``` +```html ``` +## Usage if you are using NPM install +```js +import * as getAddress from 'getaddress-find'; + +() => ( + +... + +getAddress.find( + container_id:'postcode_lookup', + api_key: 'API_KEY', + options); + +... + +) -## Usage ``` + +## Usage +```html

@@ -40,7 +58,7 @@ npm install getaddress-find ``` ## Options The full list of options, and their defaults: -``` +```js getAddress.find( container_id:'postcode_lookup', api_key: 'API_KEY', @@ -100,7 +118,7 @@ getAddress.find( ); ``` ## Events -``` +```js document.addEventListener("getaddress-find-suggestions", function(e){ console.log(e.suggestions); })