0.3.0 • Published 2 years ago
random-access-react-native v0.3.0
random-access-react-native
File storage abstraction for React Native similar to https://github.com/random-access-storage/random-access-file. Uses https://github.com/hypercore-skunkworks/react-native-libuv for all I/O under the hood.
Installation
npm install random-access-react-native
Usage
import RARN from 'random-access-react-native'
const file = new RARN('my-file.txt')
file.write(10, Uint8Array.from([1, 2, 3, 4, 5]), (err) => {
file.read(10, 5, (err, buffer) => {
file.close(() => {
console.log('file is closed')
})
})
})
License
ISC