A small library for padding strings in JavaScript. Marmalade-free.
![NPM version][shield-npm] ![Node.js version support][shield-node] ![Build status][shield-build] ![Code coverage][shield-coverage]
| type CreateActionMap<M extends { [index: string]: any }> = { | |
| // 通过 extends undefined 来判断是否有 payload 要求 | |
| [Key in keyof M]: M[Key] extends undefined | |
| ? { | |
| type: Key; | |
| } | |
| : { | |
| type: Key; | |
| payload: M[Key]; | |
| }; |
| # 网络 | |
| # 查看本地公网 IP | |
| curl ifconfig.me | |
| dig 1024.io | |
| dig -x 104.155.233.156 | |
| # 并发测试 | |
| ab -n 1000 -c 1000 http://www.meizu.com/ | |
| # 全站抓取 | |
| wget -r -p -np -k http://www.meizu.com/es/ |
| > use admin | |
| > db.createUser({user: 'root',pwd: '123456',roles: ['root']}) | |
| > db.auth('root','123456') | |
| > use page_factory | |
| > db.createUser({user: 'user',pwd: '123456',roles: [{role: 'readWrite', db: 'dbName'}]}) | |
| > db.auth('user','123456') |
A small library for padding strings in JavaScript. Marmalade-free.
![NPM version][shield-npm] ![Node.js version support][shield-node] ![Build status][shield-build] ![Code coverage][shield-coverage]
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.