funclib.js (凡客傑斯)
簡單介紹
目的:高效率完成前端業務程式碼!
funclib.js 是一個簡單、易用、貼進業務邏輯的JavaScript UMD函式庫,類似於 underscore 和 lodash。 跟它們對比,funclib.js省去了很多js自帶的或者不常用的方法。
funclib.js還根據一些實際業務的邏輯的規律封裝了很多前後端都實用的新方法, 讓你提高程式碼質量和交付效率的同時,享受程式設計的樂趣!
funclib.js使用 TypeScript 進行開發,使用 WebPack 進行打包編譯,使用 Karma / Mocha 進行單元測試, 使用 Travis-CI 進行持續整合。
訪問地址:
- 文件地址: http://funclib.net
- Github: http://github.com/CN-Tower/funclib.js
快速上手
# Install funclib.js
$ npm install funclib
# Use funclib
$ node
> var fn = require('funclib');
> console.log(fn.rdid()) // => 8GH9IYO60MXQ
克隆程式碼
# Download funclib repo
$ git clone https://github.com/CN-Tower/funclib.js.git
# $ git clone http://gitlab.zte.com.cn/CN-Tower/funclib.js.git
# Install dependency
$ npm install
# Start
$ npm start
# Do Try
$ npm run usage
# Build
$ npm run build
# Test
$ npm run test
專案結構
funclib.js
├── node_modules/ # You know the drill...
├── assets # 構建目錄
│ ├── funclib.js # 未壓縮版
│ ├── funclib.min.js # 壓縮版
│ ├── index.d.ts # 定義檔案
│ ├── index.js # 索引檔案
│ ├── package.json # 庫模組定義
│ └── README.md # Read this FIRST :)
├── script # 指令碼
│ ├── build.js # 編譯指令碼
│ ├── karma.conf.js # Karma配置
│ └── webpack.conf.js # Webpack配置
├── src # Source code
│ ├── modules # 模組
│ │ ├── _Array.ts # Array
│ │ ├── _Cookie.ts # Cookie
│ │ ├── _Dom.ts # Element
│ │ ├── _FileSys.ts # FileSystem
│ │ ├── _Function.ts # Function
│ │ ├── _Math.ts # Mathematic
│ │ ├── _Object.ts # Object
│ │ ├── _Pattern.ts # RegExp
│ │ ├── _Progress.ts # Progress
│ │ ├── _String.ts # String
│ │ ├── _Time.ts # Time
│ │ ├── _Trick.ts # Trick
│ │ ├── _Type.ts # Type
│ │ ├── _Url.ts # Url
│ │ ├── _Logc.ts # ClientLog
│ │ └── _Logs.ts # ServerLog
│ ├── funclib.conf.ts # 配置檔案
│ ├── funclib.ts # ClientMain
│ └── index.ts # ServerMain
├── test # 測試
│ ├── client-methods # 客戶端方法測試用例
│ ├── server-methods # 服務端方法測試用例
│ └── *.spec.js # 通用方法測試用例
├── .coveralls.yml # 測試覆蓋率
├── .editorconfig # Set coding style (indents, charset, etc.)
├── .gitignore # You know the drill...
├── .travis.yml # CI配置
├── LICENSE # 授權說明
├── package-lock.json # NPM Lock
├── package.json # 庫配置
├── README.md # Read this FIRST :)
├── tsconfig.json # Typescript配置
├── usage.html # 客戶端試驗
└── usage.js # 服務端試驗
写评论
很抱歉,必須登入網站才能發佈留言。