See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
// ==UserScript== | |
// @name Bilibili VIP | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description 不给叔叔送钱 | |
// @author You | |
// @match *://www.bilibili.com/bangumi/play/* | |
// @match *://www.bilibili.com/video/* | |
// @connect api.bilibili.com | |
// @icon https://www.bilibili.com/favicon.ico |
export const assign = (...objs) => Object.assign({}, ...objs) | |
export const assign2 = (...objs) => { | |
objs.unshift({}); | |
let len = objs.length; | |
while (--len > 0) | |
for (let i in objs[len]) | |
objs[0][i] = objs[len][i] | |
return objs[0] | |
} | |
// no spread operator overhead, raw arguments access, obj[0] *is* mutated! |
I'm working on a way to connect data to a user interface | |
in a way that is flexible, | |
yet still easy for end-users to work with. | |
This has been one of the biggest challenges for me. | |
## References: | |
* https://hackernoon.com/how-to-decouple-state-and-ui-a-k-a-you-dont-need-componentwillmount-cc90b787aa37 | |
* https://webpack.js.org/guides/code-splitting/ |
前端发展很快,现代浏览器原生 API 已经足够好用。我们并不需要为了操作 DOM、Event 等再学习一下 jQuery 的 API。同时由于 React、Angular、Vue 等框架的流行,直接操作 DOM 不再是好的模式,jQuery 使用场景大大减少。本项目总结了大部分 jQuery API 替代的方法,暂时只支持 IE10+ 以上浏览器。
{ | |
"name": "ra-front-simple", | |
"version": "1.0.0", | |
"private": true, | |
"scripts": { | |
"build": "nuxt build --analyze", | |
"lint": "eslint --ext .js,.vue --ignore-path .gitignore src tests", | |
"dev": "nuxt", | |
"start": "nuxt start", | |
"generate": "nuxt generate", |
function displayBio({ name, age, favouriteColour }) { | |
console.log(name, age, favouriteColour); | |
} | |
const frank = { | |
id: 124, | |
name: 'Frank', | |
age: '28', | |
address: '14 High St', | |
favouriteColour: 'red', |
/* | |
'Prototype' pattern | |
------------------- | |
Traditional pattern to emulate classical inheritance in JavaScript | |
Pros: | |
- already used by majority of OO JS developers | |
- performs well |