Skip to content

Commit 97df33b

Browse files
committed
encode: Add Map/Set to encode.getType()
1 parent 8b43267 commit 97df33b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/encode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ encode.getType = function (value) {
3131
if (ArrayBuffer.isView(value)) return 'arraybufferview'
3232
if (value instanceof Number) return 'number'
3333
if (value instanceof Boolean) return 'boolean'
34+
if (value instanceof Set) return 'set'
35+
if (value instanceof Map) return 'map'
3436
if (value instanceof ArrayBuffer) return 'arraybuffer'
3537
return typeof value
3638
}

0 commit comments

Comments
 (0)