This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getStrength = function (passwd) { | |
'use strict'; | |
var intScore = 0; | |
if (passwd.match(/[a-z]/)) // [验证]至少一个小写字母 | |
{ | |
intScore = (intScore + 1); | |
} | |
if (passwd.match(/[A-Z]/)) // [验证]至少一个大写字母 | |
{ | |
intScore = (intScore + 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
user(login: "willin") { | |
followers { | |
totalCount | |
} | |
repositories { | |
totalCount | |
} | |
repositoriesContributedTo { | |
totalCount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//定义proxy中必须实现的handler参数接口 | |
interface ProxeeHandler<T extends object, TOut extends object> { | |
get?<K extends keyof TOut>(target: T, p: K, receiver: TOut): TOut[K]; | |
set?<K extends keyof TOut>(target: T, p: K, value: TOut[K], receiver: TOut): boolean; | |
} | |
//定义proxy的构造函数接口 | |
interface ProxeeConstructor { | |
new <T extends object, TOut extends object>(target: T, handler: ProxeeHandler<T, TOut>): TOut; | |
} | |
//用以上两个接口声明一个Proxee,其用法和Proxy一模一样 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⏰ Stats for October 29th 2020 | |
Productivity Pulse 53m 26s ██████▋░░░ 67% | |
All Productive 38m 6s ███████▏░░ 71% | |
All Distracting no time ░░░░░░░░░░ 0% | |
Neutral 15m 20s ██▊░░░░░░░ 29% |
I hereby claim:
- I am willin on github.
- I am willin (https://keybase.io/willin) on keybase.
- I have a public key ASDBHt5gTYHwofsS3Iw26GVOO70t_iA32EAeUr4pjkEopwo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { "browser": true, "es6": true, "node": true }, | |
"extends": ["eslint:recommended", "plugin:react/recommended"], | |
"globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaFeatures": { "jsx": true }, | |
"ecmaVersion": 2018, | |
"sourceType": "module" | |
}, |