Skip to content

Commit b372d98

Browse files
committed
chore(ci): blog sync
1 parent 399ea08 commit b372d98

28 files changed

+58
-58
lines changed

data/blog/Async、Awiteyuanli.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Async、Awite原理
3-
date: 2023-03-10T12:50:11Z
3+
date: 2023-12-23T12:50:11Z
44
summary:
5-
tags: []
5+
tags: ["JavaScript"]
66
---
77

88
我想在异步中调用一个异步,在在这个异步中调用一个异步

data/blog/BFChegaodutaxian.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: BFC和高度塌陷
3-
date: 2022-03-10T12:50:54Z
3+
date: 2023-12-23T12:50:54Z
44
summary:
5-
tags: []
5+
tags: ["JavaScript"]
66
---
77

88
## 高度塌陷

data/blog/ES6dixin特xing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: ES6的新特性
3-
date: 2022-02-10T12:48:31Z
3+
date: 2023-12-23T12:48:31Z
44
summary:
5-
tags: []
5+
tags: ["JavaScript"]
66
---
77

88
## 数组的解构

data/blog/ES6dixin特xing(er).mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: ES6的新特性(二)
3-
date: 2022-02-11T12:49:13Z
3+
date: 2023-12-23T12:49:13Z
44
summary:
5-
tags: []
5+
tags: ["JavaScript"]
66
---
77

88
## Symbol

data/blog/ES6dixin特xing(san).mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: ES6的新特性(三)
3-
date: 2022-02-20T12:49:31Z
3+
date: 2023-12-23T12:49:31Z
44
summary:
5-
tags: []
5+
tags: ["JavaScript"]
66
---
77

88
## Array.prototype.includes

data/blog/JSerjinzhishujudichuli:qianxiBlob、ArrayBuffer、File、Buffer.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
tags: ["JavaScript"]
66
---
77

8-
### 前言
8+
## 前言
99
最近一直在对接媒体相关的需求,流媒体播放、语音输入之类的,踩了很多坑,总结下来是自己对于二进制数据的处理并不是很熟悉,今天抽空整理了一下相关二进制处理对象的使用和他们互相之间的转化。
1010

11-
### Blob
11+
## Blob
1212
[blob](https://developer.mozilla.org/zh-CN/docs/Web/API/Blob/Blob)全称是 _Binary Large Object_ 表示一个不可变,原始类型的类文件对象,它可以是图片、音频、视频等,它的数据可以按照文本或二进制的格式进行读取。
1313

1414
blob()包含两个参数
@@ -26,19 +26,19 @@ const blob = new Blob([array],"text/html")
2626
当然也可以是其他的[MIME类型](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types)
2727

2828

29-
### Flie
29+
## Flie
3030
`File`继承了`Blob`的所有属性,可以看成一个特殊的`Blob`,且可以用在任意的 Blob 类型的 context 中。比如说, [FileReader](https://developer.mozilla.org/zh-CN/docs/Web/API/FileReader), [URL.createObjectURL()](https://developer.mozilla.org/zh-CN/docs/Web/API/URL/createObjectURL_static), [createImageBitmap()](https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap), 及 [XMLHttpRequest.send()](https://developer.mozilla.org/zh-CN/docs/Web/API/XMLHttpRequest#send()) 都能处理 Blob 和 File。
3131

3232
从常见的来看,我们通过`input`标签上传一个文件,得到的就是一个`File`
3333

3434

35-
### ArrayBuffer
35+
## ArrayBuffer
3636
`ArrayBuffer` 对象用来表示通用的、固定长度的原始二进制数据缓冲区。
3737
它是一个字节数组,通常在其他语言中称为“byte array”。你不能直接操作 ArrayBuffer 中的内容;而是要通过[类型化数组对象](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)[DataView](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/DataView) 对象来操作,它们会将缓冲区中的数据表示为特定的格式,并通过这些格式来读写缓冲区的内容。
3838

3939
[ArrayBuffer()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/ArrayBuffer) 构造函数创建一个以字节为单位的给定长度的新 ArrayBuffer。你也可以从现有的数据(例如,从 [Base64](https://developer.mozilla.org/zh-CN/docs/Glossary/Base64) 字符串或者[从本地文件](https://developer.mozilla.org/zh-CN/docs/Web/API/FileReader/readAsArrayBuffer))获取数组缓冲区。
4040

41-
#### 使用DataView操作
41+
### 使用DataView操作
4242
```
4343
// 新建一个buffer
4444
const buffer = new ArrayBuffer(16)
@@ -52,7 +52,7 @@ const blob = new Blob([array],"text/html")
5252
![image](https://github.com/coderInwind/inwindBlog/assets/91716457/62838808-ed53-4f3d-97fd-154e8d89f210)
5353
这就是基本的使用,我们可以设置8-bit、16-bit、32-bit、64-bit的写入和读取,设置写入的偏移量,需要注意的是64-bit数据的类型得是大数(bigint)。
5454

55-
#### 使用TypedArray操作
55+
### 使用TypedArray操作
5656
它会有数个类提供给我们操作数据:
5757
```
5858
const buffer = new ArrayBuffer(16)

data/blog/Vueyuanmayuedu——Vueneibudichushihualiucheng.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Vue源码阅读——Vue内部的初始化流程
3-
date: 2022-11-25T12:18:35Z
3+
date: 2023-12-23T12:18:35Z
44
summary:
5-
tags: []
5+
tags: ["Vue"]
66
---
77

88
## new 一个 Vue 实例

data/blog/Vueyuanmayuedu——xiangmujiegoufenxi.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Vue源码阅读——项目结构分析
3-
date: 2022-11-23T12:05:22Z
3+
date: 2023-12-23T12:05:22Z
44
summary:
55
tags: ["Vue"]
66
---

data/blog/Vueyuanma——chushihuainitLifecycle.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Vue源码——初始化initLifecycle
3-
date: 2022-12-27T12:25:31Z
3+
date: 2023-12-23T12:25:31Z
44
summary:
5-
tags: []
5+
tags: ["Vue"]
66
---
77

88
## 前言

data/blog/Vueyuanma——gongjuhanshucached.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Vue源码——工具函数cached
3-
date: 2022-12-26T12:24:22Z
3+
date: 2023-12-23T12:24:22Z
44
summary:
5-
tags: []
5+
tags: ["Vue"]
66
---
77

88
## 前言

0 commit comments

Comments
 (0)