url2lang

0.1.7 • Public • Published

url2lang

url2lang returns the language code from the language information contained in the url.

url2lang は url に含まれている言語情報から 言語コードを返します。

Usage

import url2lang from 'url2lang'

const lang = url2lang(window.location.pathname)

console.log(lang)
// en

Readme

Keywords

Package Sidebar

Install

npm i url2lang

Weekly Downloads

21

Version

0.1.7

License

MIT

Unpacked Size

3.97 kB

Total Files

5

Last publish

Collaborators

  • takasqr