0.0.13 • Published 6 years ago

@mgsong/min-utils v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

min-utils

getQueryParams

// ex) http://www.11st.co.kr/product/SellerProductDetail.tmall?method=getSellerProductDetail&prdNo=2228972569&trTypeCd=22&trCtgrNo=895019

const queryParam = getQueryParams(window.location.href)
console.log(queryParam)
/*
{
    method: "getSellerProductDetail",
    prdNo: "2228972569",
    trTypeCd: "22",
    trCtgrNo: "895019"
}
*/

setQueryParams

setQueryParams({id: 123, value: 'blabla'})
// https://blabla.com?id=123&value=blabla

numberWithCommas

console.log(numberWithCommas(123456))
// 123,456

enableUrl

const str = 'hello google http://google.com'
console.log(enableUrl(str))
/*
hello google <a href="http://google.com">http://google.com</a>
*/

onlyNumber

<input onkeydown="onlyNumber(event)">
0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.3

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago