pptxtojson 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/shape.js +3 -4
package/README.md
CHANGED
|
@@ -44,6 +44,21 @@ document.querySelector('input').addEventListener('change', evt => {
|
|
|
44
44
|
})
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
### Node.js(实验性,1.5.0以上版本)
|
|
48
|
+
```javascript
|
|
49
|
+
const pptxtojson = require('pptxtojson/dist/index.cjs')
|
|
50
|
+
const fs = require('fs')
|
|
51
|
+
|
|
52
|
+
async function func() {
|
|
53
|
+
const buffer = fs.readFileSync('test.pptx')
|
|
54
|
+
|
|
55
|
+
const json = await pptxtojson.parse(buffer.buffer)
|
|
56
|
+
console.log(json)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
func()
|
|
60
|
+
```
|
|
61
|
+
|
|
47
62
|
### 输出示例
|
|
48
63
|
```javascript
|
|
49
64
|
{
|