# yang-init

> init scss and public js

Latest version **1.1.2** (published 2019-01-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install yang-init
pnpm add yang-init
yarn add yang-init
bun add yang-init
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2019-01-24 |
| First published | 2018-11-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | yang |
| Maintainers | fyang |
| Keywords | yang1008 |

## Links

- npm: https://www.npmjs.com/package/yang-init
- Repository: https://github.com/fffyang/yang-utils
- Homepage: https://github.com/fffyang/yang-utils#readme
- Issues: https://github.com/fffyang/yang-utils/issues
- npm.io page: https://npm.io/package/yang-init

## Recent versions

- 1.1.2 (latest) — 2019-01-24
- 1.1.1 — 2019-01-24
- 1.1.0 — 2019-01-21
- 1.0.8 — 2019-01-21
- 1.0.6 — 2018-11-17
- 1.0.5 — 2018-11-03
- 1.0.3 — 2018-11-01
- 1.0.2 — 2018-11-01
- 1.0.1 — 2018-11-01
- 1.0.0 — 2018-11-01

## README

# yang-utils

```
初始化css样式及常用js

npm i yang-init
or  
yarn add yang-init  

vue > main.js  
import utils from "yang-init";  
import "yang-init/style.scss";  
  
Vue.prototype.$utils = utils;
```
scs依赖于scss预编译(持续更新)

js方法说明：（持续更细）

1. 原型方法
* 时间日期格式化  
new Date().Format('yyyy-MM-dd hh:mm:ss')

2. 函数方法
* newData  
深copy

* getDifferent(arr1,arr2)  
// 取出两个数组中的不同元素

* arrayDedup(arr)  
// 数组去重

* isJSON(string)  
// 判断是否json字符串

* swapItem(arr,fromIndex,toIndex)  
// 数组元素移动  
// fromIndex: 当前元素所在位置索引, toIndex: 移动到交换的位置索引

3. 常用正则编录（持续更细）  
* regExp.existChinese  
// 存在中文

* regExp.onlyChinese  
// 只有中文

* regExp.existNum  
// 存在数字

* regExp.onlyNum 
// 只有数字

* regExp.existLetter
// 存在字母

* regExp.onlyLetter
// 只有字母

* regExp.num_letter
// 匹配数字+字母

* regExp.num_letter_special
// 匹配数字 + 字母 + 特殊字符

* regExp.num_letter_require
// 匹配数字 + 字母,且必须包含

* regExp.phone
// 手机号

* regExp.email 
// Email

* regExp.url
// 网址URL

* regExp.qq
// qq号

* regExp.postalCode
// 邮政编码

* regExp.ip
// ip

* regExp.idCard
// 身份证号

* regExp.date
// 格式日期

* regExp.money
// 金钱

---
_Source: https://npm.io/package/yang-init · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
