git ssb

0+

wanderer🌟 / js-dfinity-radix-tree



Commit 0a2ff8de9be467a416ae023a6257e799a5db796f

use safe buffer

wanderer committed on 8/4/2017, 10:16:22 PM
Parent: f45337de9e0a6483fad38e4162908b16c457c0b2

Files changed

index.jschanged
package.jsonchanged
index.jsView
@@ -1,5 +1,6 @@
11 const Graph = require('ipld-graph-builder')
2 +const Buffer = require('safe-buffer').Buffer
23 const Uint1Array = require('uint1array')
34 const TextEncoder = require('text-encoding').TextEncoder
45
56 const encoder = new TextEncoder('utf-8')
@@ -286,9 +287,9 @@
286287 }
287288
288289 function setExtension (node, ex) {
289290 if (ex && ex.length) {
290- node['/'][EXTENSION] = [ex.length, new Buffer(ex.buffer)]
291 + node['/'][EXTENSION] = [ex.length, Buffer.from(ex.buffer)]
291292 } else {
292293 if (getValue(node) === undefined && node['/'][EXTENSION] !== undefined) {
293294 node['/'].pop()
294295 } else if (node['/'][EXTENSION] !== undefined) {
package.jsonView
@@ -25,9 +25,15 @@
2525 "standard": "^10.0.0",
2626 "tape": "^4.6.3"
2727 },
2828 "dependencies": {
29 + "buffer": "^5.0.6",
2930 "ipld-graph-builder": "^1.2.4",
3031 "text-encoding": "^0.6.4",
3132 "uint1array": "^1.0.5"
33 + },
34 + "standard": {
35 + "ignore": [
36 + "/benchmark/"
37 + ]
3238 }
3339 }

Built with git-ssb-web