Skip to content

Commit

Permalink
Add buffer for browsers (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Apr 3, 2020
1 parent 8eb2f5d commit 085ffe9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"./util/immediate.js": "./util/immediate-browser.js"
},
"dependencies": {
"abstract-leveldown": "~6.2.1",
"abstract-leveldown": "~6.2.3",
"buffer": "^5.5.0",
"immediate": "~3.2.3",
"inherits": "^2.0.3",
"ltgt": "^2.1.2"
Expand Down
1 change: 1 addition & 0 deletions util/deserialize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

var Buffer = require('buffer').Buffer
var ta2str = (function () {
if (global.TextDecoder) {
var decoder = new TextDecoder('utf-8')
Expand Down
1 change: 1 addition & 0 deletions util/serialize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

var Buffer = require('buffer').Buffer
// Returns either a Uint8Array or Buffer (doesn't matter to
// IndexedDB, because Buffer is a subclass of Uint8Array)
var str2bin = (function () {
Expand Down
2 changes: 2 additions & 0 deletions util/support.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict'

var Buffer = require('buffer').Buffer

exports.test = function (key) {
return function test (impl) {
try {
Expand Down

0 comments on commit 085ffe9

Please sign in to comment.