New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@greenlabs/res-daum-postcode

Package Overview
Dependencies
Maintainers
6
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@greenlabs/res-daum-postcode

ReScript binding to Daum Postcode

0.1.1
latest
Source
npm
Version published
Maintainers
6
Created
Source

다음 주소 검색 리스크립트 바인딩

res-daum-postcode다음 주소 검색 자바스크립트 모듈의 리스크립트(ReScript) 바인딩 입니다.

설치하기

  • 모듈 설치
npm i @greenlabs/res-daum-postcode
or
yarn add @greenlabs/res-daum-postcode
  • bsconfig.json 의존성 추가하기
"bs-dependencies": [
  "@greenlabs/res-daum-postcode"
]

사용방법

open DaumPostCode

let option = makeOption(
  ~oncomplete=data => data->Js.Console.log,
  ~onresize=size => size->Js.Console.log,
  ~onclose=state =>
    switch state {
    | #FORCE_CLOSE => "fc"->Js.Console.log
    | #COMPLETE_CLOSE => "cc"->Js.Console.log
    },
  ~onsearch=data => data->Js.Console.log,
  ~width=500.0,
  ~height=700.0,
  (),
)
let daumPostCode = option->make

// 팝업 방식
let openOption = makeOpenOption(
  ~q=`문정동`,
  ~left=100.0,
  ~top=200.0,
  ~popupName="주소검색",
  ~autoClose=true,
  (),
)
daumPostCode->openPostCode(openOption)

// 임베드 방식
open Webapi
let embedOption = makeEmbedOption(~q=`문정동`, ~autoClose=true)
let div = Dom.document |> Dom.Document.getElementById("search-address")
div->Belt.Option.map(el => daumPostCode->embedPostCode(el, embedOption))->ignore

API

다음 주소 검색 API

Keywords

ReScript

FAQs

Package last updated on 19 Sep 2022

Did you know?

Socket

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.

Install

Related posts