@sammacbeth/random-access-idb-mutable-file

WebJar for @sammacbeth/random-access-idb-mutable-file

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

sammacbeth__random-access-idb-mutable-file
Последняя версия

Последняя версия

0.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

@sammacbeth/random-access-idb-mutable-file
WebJar for @sammacbeth/random-access-idb-mutable-file
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/Gozala/random-access-idb-mutable-file

Скачать sammacbeth__random-access-idb-mutable-file

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/sammacbeth__random-access-idb-mutable-file/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>sammacbeth__random-access-idb-mutable-file</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/sammacbeth__random-access-idb-mutable-file/
implementation 'org.webjars.npm:sammacbeth__random-access-idb-mutable-file:0.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/sammacbeth__random-access-idb-mutable-file/
implementation ("org.webjars.npm:sammacbeth__random-access-idb-mutable-file:0.1.1")
'org.webjars.npm:sammacbeth__random-access-idb-mutable-file:jar:0.1.1'
<dependency org="org.webjars.npm" name="sammacbeth__random-access-idb-mutable-file" rev="0.1.1">
  <artifact name="sammacbeth__random-access-idb-mutable-file" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='sammacbeth__random-access-idb-mutable-file', version='0.1.1')
)
libraryDependencies += "org.webjars.npm" % "sammacbeth__random-access-idb-mutable-file" % "0.1.1"
[org.webjars.npm/sammacbeth__random-access-idb-mutable-file "0.1.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : buffer jar [5.1.0]
org.webjars.npm : random-access-storage jar [1.3.0]

Модули Проекта

Данный проект не имеет модулей.

random-access-idb-mutable-file

travis package downloads styled with prettier

random-access storage layer over IDBMutableFile, which is non-standard IndexedDB extension in Gecko to provide virtual file system API with-in the IndexedDB.

This library will only work in Firefox (unless other browsers implement IDBMutableFile API) and it's mostly targeted at WebExtensions. It mostly amis to be a drop-in replacement for random-access-file. It is also an alternative to random-access-idb that is able to avoid loading all of the file content for random read / writes at the expanse of limited runtime suport.

Usage

import RandomAccess from "random-access-idb-mutable-file"

const main = async (filename, options) => {
  const randomAccessFile = await RandomAccess.mount()

  const file = randomAccessFile(filename, options)
  file.write(10, Buffer.from("hello"), error => {
    // write a buffer to offset 10
    file.read(10, 5, (error, buffer) => {
      console.log(buffer) // read 5 bytes from offset 10
      file.close(() => {
        console.log("file is closed")
      })
    })
  })
}

Install

npm install random-access-idb-mutable-file

Версии библиотеки

Версия
0.1.1