Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
const RandomAccessStorage = require('random-access-storage')
const fs = require('fs')
const path = require('path')
const constants = fs.constants || require('constants') // eslint-disable-line n/no-deprecated-api
const constants = fs.constants

let fsext = null
try {
fsext = require('fs-native-extensions')
} catch {
try { // tmp workaround for places where fsctl is bundled...
fsext = {
tryLock: require('fsctl').lock,
sparse: () => Promise.resolve()
}
} catch {}
}
} catch {}

const RDWR = constants.O_RDWR
const RDONLY = constants.O_RDONLY
Expand Down
Loading