Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

content-entry

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

content-entry - npm Package Compare versions

Comparing version 7.0.0 to 8.0.0

19

package.json
{
"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"
}
}

@@ -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` &#x20;
## 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` &#x20;
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` &#x20;
### Properties
* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;
## 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)**&#x20;
* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;
### 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)>**&#x20;
### readStream
Returns **any** undefined
### string
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
### buffer
return {Uint8Array}
### encoding
The default encoding used to convert content to strings.
Returns **BufferEncoding**&#x20;
### equalsContent
Compare content against other entry.
#### Parameters
* `other` **[ContentEntry](#contententry)**&#x20;
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)**&#x20;
### 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)**&#x20;
Returns **Readable**&#x20;
## 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)**&#x20;
* `readStream` **ReadableStream**&#x20;
### Properties
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
* `readStream` **ReadableStream**&#x20;
## StreamContentEntryMixin
Content entries where a stream is the primary data representation.
### Parameters
* `superclass` &#x20;
## StringContentEntryMixin
Content entries where a string is the primary data representation.
### Parameters
* `superclass` &#x20;
### Properties
* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
## 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)**&#x20;
* `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
### Properties
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
### 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)**&#x20;
* `b` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;
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` &#x20;## 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` &#x20;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` &#x20;### Properties* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;## 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)**&#x20;
* `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;### 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)**&#x20;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)**&#x20;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)**&#x20;
* `readStream` **ReadableStream**&#x20;### Properties* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
* `readStream` **ReadableStream**&#x20;## StreamContentEntryMixinContent entries where a stream is the primary data representation.### Parameters* `superclass` &#x20;## StringContentEntryMixinContent entries where a string is the primary data representation.### Parameters* `superclass` &#x20;### Properties* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;## 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)**&#x20;
* `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;### Properties* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
* `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;### 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)**&#x20;
* `b` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc