🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@existdb/node-exist

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@existdb/node-exist - npm Package Compare versions

Comparing version
5.2.1
to
5.3.0
+5
-0
components/documents.js

@@ -19,2 +19,6 @@ const { getMimeType } = require('./util')

function readBinary (client, documentName) {
return client.promisedMethodCall('getBinaryResource', [documentName])
}
function remove (client, documentName) {

@@ -28,3 +32,4 @@ return client.promisedMethodCall('remove', [documentName])

read,
readBinary,
remove
}
+1
-1

@@ -55,3 +55,3 @@ {

},
"version": "5.2.1"
"version": "5.3.0"
}

@@ -299,6 +299,34 @@ # node-exist

Reads resources stored as XML (`XMLResource`). You can control how they are
serialized by setting
[serialization options](https://exist-db.org/exist/apps/doc/xquery.xml?field=all&id=D3.49.19#serialization)
in the options parameter.
Use default serialization options.
```js
db.documents.read('foo.xml')
db.documents.read('foo.xml', {})
```
Force XML declaration to be returned.
```js
db.documents.read('foo.xml', { "omit-xml-declaration": "no" })
```
Force the file to end in a blank line (available since eXist-db v6.0.1).
```js
db.documents.read('foo.xml', { "insert-final-newline": "yes" })
```
#### readBinary
Reads resources stored as binary (`BinaryResource`) inside existdb such as XQuery,
textfiles, PDFs, CSS, images and the like.
```js
db.documents.readBinary('foo.xml')
```
#### remove

@@ -305,0 +333,0 @@