baooab.github.io

Zhang Bao’s Personal Website

Hello, My Chinese name is “张宝”. I am a front-end development programmer (more than 6 years of experience)from Shanghai, China. I usually write in Chinese.

I am active in many Chinese communities, such as juejin(掘金), Yuque(语雀) and bilibili(B站).

Here is a list of what I publish on these platforms:

周刊 & 教程

JavaScript

Node.js

React

Vue

TypeScript

前端工程化

CSS

其他


常用代码片段

// 获取一个对象上所有的属性键。Symbol 和字符串,枚举和不可枚举
function getOwn(obj) {
    return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj))
}

// 判定一个对象上是否包含指定属性键
Object.hasOwn(obj, propKey)