# vuetom-js **Repository Path**: lauset/vuetom-js ## Basic Information - **Project Name**: vuetom-js - **Description**: 集成众多 js 类库使用,提供了插件化功能可单独应用功能模块,项目采用 pnpm monorepo 工程化可持续集成个人的 js 工具类 - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: main - **Homepage**: https://www.npmjs.com/package/vuetom - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2022-04-30 - **Last Updated**: 2024-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: JavaScript, TypeScript, Library ## README # Vuetom.js * 💪 Immutable * 🔥 Chainable --- ## Getting Started ### Installation ```console npm install vuetom --save ``` ### Using Vuetom.js & Plugins #### Node.js Available Plugins: request, date ```js const { createVuetom, isVuetom } = require('vuetom') const vt = createVuetom() ``` use date plugin ```js const date = require('vuetom/plugin/date') vt.use(date) console.log(vt.date(new Date(), 'YYYY-MM-DD HH:mm:ss')) // 2022-xx-xx xx:xx:xx console.log(vt.getDate()) // get date object ``` use http request plugin Function has: - http - httpGet - httpPost - httpJsonp - httpFetch ```js const request = require('vuetom/plugin/request') vt.use(request) vt.http('https://api.github.com/users/yyx990803', { method: 'get' }, (err, resp, body) => { console.log('err', err) console.log('body', body) }) ``` #### ES6 syntax Available Plugins: date ```js import { createVuetom } from 'vuetom' import date from 'vuetom/plugin/date' // The usage is the same as nodejs // ... ``` #### Browser Available Plugins: date ```html ``` ## Plugins [Common] - date: Simple date time conversion [Node] - request: HTTP request based on nodejs [Browser] - storage: LocalStorage Utils
## Development ``` pnpm install ``` **packages/vuetom** ```sh cd packages/vuetom # build dist pnpm b # build modules pnpm b:esm # build browser node pnpm b:umd ``` **packages/test** ```sh cd packages/test # node test pnpm test-n # es test pnpm test-es # web test # preview.html ``` ## License Vuetom.js is licensed under a [MIT License](./LICENSE).