content-entry
Advanced tools
Comparing version 7.0.0 to 8.0.0
{ | ||
"name": "content-entry", | ||
"version": "7.0.0", | ||
"version": "8.0.0", | ||
"publishConfig": { | ||
@@ -46,12 +46,12 @@ "access": "public" | ||
"devDependencies": { | ||
"@types/node": "^18.11.18", | ||
"ava": "^5.1.1", | ||
"browser-ava": "^1.3.19", | ||
"c8": "^7.12.0", | ||
"@types/node": "^18.14.5", | ||
"ava": "^5.2.0", | ||
"browser-ava": "^1.3.26", | ||
"c8": "^7.13.0", | ||
"documentation": "^14.0.1", | ||
"semantic-release": "^20.0.3", | ||
"typescript": "^4.9.4" | ||
"semantic-release": "^20.1.1", | ||
"typescript": "^4.9.5" | ||
}, | ||
"engines": { | ||
"node": ">=16.19.0" | ||
"node": ">=18.15.0" | ||
}, | ||
@@ -73,3 +73,6 @@ "repository": { | ||
] | ||
}, | ||
"dependencies": { | ||
"browser-stream-util": "^1.0.0" | ||
} | ||
} |
288
README.md
@@ -10,15 +10,3 @@ [![npm](https://img.shields.io/npm/v/content-entry.svg)](https://www.npmjs.com/package/content-entry) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/arlac77/content-entry/badge.svg)](https://snyk.io/test/github/arlac77/content-entry) | ||
[![Coverage Status](https://coveralls.io/repos/arlac77/content-entry/badge.svg)](https://coveralls.io/github/arlac77/content-entry) | ||
## content-entry | ||
content entries for content containers (aka files) | ||
# API | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
### Table of Contents | ||
* [CollectionEntryMixin](#collectionentrymixin) | ||
[![Coverage Status](https://coveralls.io/repos/arlac77/content-entry/badge.svg)](https://coveralls.io/github/arlac77/content-entry)## content-entrycontent entries for content containers (aka files)# API<!-- Generated by documentation.js. Update this documentation by updating the source code. -->### Table of Contents* [CollectionEntryMixin](#collectionentrymixin) | ||
* [Parameters](#parameters) | ||
@@ -76,266 +64,12 @@ * [BaseEntry](#baseentry) | ||
* [equalsUint8Arrays](#equalsuint8arrays) | ||
* [Parameters](#parameters-11) | ||
## CollectionEntryMixin | ||
Brings directory attributes to entries. | ||
### Parameters | ||
* `superclass`   | ||
## BaseEntry | ||
Representation of one file or directory entry. | ||
All names are absolute (no leading '/') the group seperator is '/'. | ||
### Parameters | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name inside of the container | ||
### Properties | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name inside of the container | ||
### types | ||
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** UTI types | ||
### isCollection | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false | ||
### isBlob | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false | ||
### mode | ||
Default unix mode for files. | ||
Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 0644 | ||
### isEmpty | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if there is no content (length := 0). | ||
### isDeleted | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if we represent a deleted entry | ||
### isExistent | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if we exist | ||
### equals | ||
#### Parameters | ||
* `other`   | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true if name, isBlob and isCollection are the same | ||
## BufferContentEntryMixin | ||
Content entries where a Uint8Array is the primary data representation. | ||
### Parameters | ||
* `superclass`   | ||
### Properties | ||
* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**  | ||
## BufferContentEntry | ||
**Extends BufferContentEntryMixin(ContentEntry)** | ||
ConentEntry with a Uint8Array as content store. | ||
### Parameters | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**  | ||
### isEmpty | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if buffer length is zero | ||
### size | ||
Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** size in bytes | ||
## ContentEntry | ||
**Extends BaseEntry** | ||
General content access entries. | ||
### isBlob | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true | ||
### types | ||
UTI types for this entry. | ||
defaults to "public.content". | ||
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**  | ||
### readStream | ||
Returns **any** undefined | ||
### string | ||
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
### buffer | ||
return {Uint8Array} | ||
### encoding | ||
The default encoding used to convert content to strings. | ||
Returns **BufferEncoding**  | ||
### equalsContent | ||
Compare content against other entry. | ||
#### Parameters | ||
* `other` **[ContentEntry](#contententry)**  | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true if other has the same content (bitwise) | ||
### getReadStream | ||
**Meta** | ||
* **deprecated**: This is deprecated. | ||
## DeletedContentEntry | ||
**Extends EmptyContentEntry** | ||
Represents a deleted entry. | ||
### isDeleted | ||
We are always deleted. | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true | ||
### isExistent | ||
Nothing there any more. | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false | ||
## EmptyContentEntry | ||
**Extends ContentEntry** | ||
Represents a entry without content (content length = 0). | ||
### string | ||
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
### buffer | ||
Returns **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)** zero length buffer | ||
### readStream | ||
Returns **ReadableStream** zero length stream. | ||
## toReadableStream | ||
### Parameters | ||
* `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
Returns **Readable**  | ||
## ReadableStreamContentEntry | ||
**Extends StreamContentEntryMixin(ContentEntry)** | ||
Content entries where a readable stream is the primary data representation. | ||
### Parameters | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `readStream` **ReadableStream**  | ||
### Properties | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `readStream` **ReadableStream**  | ||
## StreamContentEntryMixin | ||
Content entries where a stream is the primary data representation. | ||
### Parameters | ||
* `superclass`   | ||
## StringContentEntryMixin | ||
Content entries where a string is the primary data representation. | ||
### Parameters | ||
* `superclass`   | ||
### Properties | ||
* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
## StringContentEntry | ||
**Extends StringContentEntryMixin(ContentEntry)** | ||
Content entries where a string is the primary data representation. | ||
### Parameters | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
### Properties | ||
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
### isEmpty | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if string length is zero | ||
## equalsUint8Arrays | ||
Returns true if the two passed Uint8Arrays have the same content | ||
### Parameters | ||
* `a` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**  | ||
* `b` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**  | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if content of a equals b | ||
# install | ||
With [npm](http://npmjs.org) do: | ||
```shell | ||
* [Parameters](#parameters-11)## CollectionEntryMixinBrings directory attributes to entries.### Parameters* `superclass`  ## BaseEntryRepresentation of one file or directory entry. | ||
All names are absolute (no leading '/') the group seperator is '/'.### Parameters* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name inside of the container### Properties* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name inside of the container### typesReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** UTI types### isCollectionReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false### isBlobReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false### modeDefault unix mode for files.Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 0644### isEmptyReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if there is no content (length := 0).### isDeletedReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if we represent a deleted entry### isExistentReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if we exist### equals#### Parameters* `other`  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true if name, isBlob and isCollection are the same## BufferContentEntryMixinContent entries where a Uint8Array is the primary data representation.### Parameters* `superclass`  ### Properties* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)** ## BufferContentEntry**Extends BufferContentEntryMixin(ContentEntry)**ConentEntry with a Uint8Array as content store.### Parameters* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)** ### isEmptyReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if buffer length is zero### sizeReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** size in bytes## ContentEntry**Extends BaseEntry**General content access entries.### isBlobReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true### typesUTI types for this entry. | ||
defaults to "public.content".Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** ### readStreamReturns **any** undefined### stringReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ### bufferreturn {Uint8Array}### encodingThe default encoding used to convert content to strings.Returns **BufferEncoding** ### equalsContentCompare content against other entry.#### Parameters* `other` **[ContentEntry](#contententry)** Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true if other has the same content (bitwise)### getReadStream**Meta*** **deprecated**: This is deprecated.## DeletedContentEntry**Extends EmptyContentEntry**Represents a deleted entry.### isDeletedWe are always deleted.Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true### isExistentNothing there any more.Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false## EmptyContentEntry**Extends ContentEntry**Represents a entry without content (content length = 0).### stringReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ### bufferReturns **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)** zero length buffer### readStreamReturns **ReadableStream** zero length stream.## toReadableStream### Parameters* `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returns **Readable** ## ReadableStreamContentEntry**Extends StreamContentEntryMixin(ContentEntry)**Content entries where a readable stream is the primary data representation.### Parameters* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `readStream` **ReadableStream** ### Properties* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `readStream` **ReadableStream** ## StreamContentEntryMixinContent entries where a stream is the primary data representation.### Parameters* `superclass`  ## StringContentEntryMixinContent entries where a string is the primary data representation.### Parameters* `superclass`  ### Properties* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ## StringContentEntry**Extends StringContentEntryMixin(ContentEntry)**Content entries where a string is the primary data representation.### Parameters* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ### Properties* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**  | ||
* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ### isEmptyReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if string length is zero## equalsUint8ArraysReturns true if the two passed Uint8Arrays have the same content### Parameters* `a` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**  | ||
* `b` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)** Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if content of a equals b# installWith [npm](http://npmjs.org) do:```shell | ||
npm install content-entry | ||
``` | ||
# license | ||
BSD-2-Clause | ||
```# licenseBSD-2-Clause |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
524
26423
1
74
+ Addedbrowser-stream-util@^1.0.0
+ Addedbrowser-stream-util@1.3.4(transitive)
+ Addedmf-hosting-frontend@3.8.3(transitive)