https://github.com/worktile/util-kits
https://github.com/worktile/util-kits
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/worktile/util-kits
- Owner: worktile
- License: mit
- Created: 2017-10-24T09:34:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T09:45:25.000Z (about 3 years ago)
- Last Synced: 2025-05-21T20:18:03.201Z (10 months ago)
- Language: JavaScript
- Size: 159 KB
- Stars: 3
- Watchers: 9
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# util-kits
util kits for browser.js.
## Installation
`npm install @worktile/util-kits --save`
## Usage
```
// browser
var currentLanguage = utilKits.browser.getLanguage();
console.log(currentLanguage);
```
```
// cookie
utilKits.cookie('sid'); // get cookie 'sid'
utilKits.cookie('sid', 'xxxxxxx'); // set cookie 'sid=xxxxxxx'
```
```
// URI
// get current url query param
// http://127.0.0.1:8080?name=hello => 'hello'
utilKits.URI.query('name');
(new utilKits.URI('http://127.0.0.1:8080?name=hello')).query.name; // hello
```