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

content entries for content containers (aka files)

  • 8.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-13.12%
Maintainers
1
Weekly downloads
 
Created
Source

npm License Open Bundle downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities Coverage Status## content-entrycontent entries for content containers (aka files)# API### Table of Contents* CollectionEntryMixin * Parameters

  • BaseEntry
  • BufferContentEntryMixin
  • BufferContentEntry
  • ContentEntry
  • DeletedContentEntry
  • EmptyContentEntry
  • toReadableStream
  • ReadableStreamContentEntry
  • StreamContentEntryMixin
  • StringContentEntryMixin
  • StringContentEntry
  • equalsUint8Arrays
    • Parameters## 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 name inside of the container### Properties* name string name inside of the container### typesReturns Array<string> UTI types### isCollectionReturns boolean false### isBlobReturns boolean false### modeDefault unix mode for files.Returns number 0644### isEmptyReturns boolean true if there is no content (length := 0).### isDeletedReturns boolean true if we represent a deleted entry### isExistentReturns boolean true if we exist### equals#### Parameters* other Returns Promise<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 ## BufferContentEntry**Extends BufferContentEntryMixin(ContentEntry)*ConentEntry with a Uint8Array as content store.### Parameters name string
  • buffer Uint8Array ### isEmptyReturns boolean true if buffer length is zero### sizeReturns number size in bytes## ContentEntryExtends BaseEntryGeneral content access entries.### isBlobReturns boolean true### typesUTI types for this entry. defaults to "public.content".Returns Array<string> ### readStreamReturns any undefined### stringReturns string ### bufferreturn {Uint8Array}### encodingThe default encoding used to convert content to strings.Returns BufferEncoding ### equalsContentCompare content against other entry.#### Parameters* other ContentEntry Returns Promise<boolean> true if other has the same content (bitwise)### getReadStreamMeta* deprecated: This is deprecated.## DeletedContentEntryExtends EmptyContentEntryRepresents a deleted entry.### isDeletedWe are always deleted.Returns boolean true### isExistentNothing there any more.Returns boolean false## EmptyContentEntryExtends ContentEntryRepresents a entry without content (content length = 0).### stringReturns string ### bufferReturns Uint8Array zero length buffer### readStreamReturns ReadableStream zero length stream.## toReadableStream### Parameters* input string Returns Readable ## ReadableStreamContentEntry**Extends StreamContentEntryMixin(ContentEntry)*Content entries where a readable stream is the primary data representation.### Parameters name string
  • readStream ReadableStream ### Properties* name 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 ## StringContentEntry**Extends StringContentEntryMixin(ContentEntry)*Content entries where a string is the primary data representation.### Parameters name string
  • value string ### Properties* name string
  • string string ### isEmptyReturns boolean true if string length is zero## equalsUint8ArraysReturns true if the two passed Uint8Arrays have the same content### Parameters* a Uint8Array
  • b Uint8Array Returns boolean true if content of a equals b# installWith npm do:```shell npm install content-entry

Keywords

FAQs

Package last updated on 14 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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