Permalink
Browse files

Fix scope error, we don't always know what this is.

  • Loading branch information...
1 parent f07ab64 commit bdb022f1b4e6055063fb8b23fe8fd8c5abca0e20 @kesla committed May 2, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 snappy.coffee
View
@@ -23,7 +23,7 @@
binding = require('./build/default/binding')
# Parsers
-exports.parsers =
+exports.parsers = parsers =
json: (buffer) ->
return JSON.parse buffer
string: (buffer) ->
@@ -50,14 +50,14 @@ exports.isValidCompressedSync = (input, callback) ->
binding.isValidCompressedSync(input, callback)
# de-/uncompress
-exports.uncompress = (compressed, callback, parse = @parsers.raw) ->
+exports.uncompress = (compressed, callback, parse = parsers.raw) ->
binding.uncompress(compressed, (err, data) ->
data = parse(data) if data?
callback(err, data)
)
exports.decompress = exports.uncompress
-exports.uncompressSync = (compressed, callback, parse = @parsers.raw) ->
+exports.uncompressSync = (compressed, callback, parse = parsers.raw) ->
binding.uncompressSync(compressed, (err, data) ->
data = parse(data) if data?
callback(err, data)

0 comments on commit bdb022f

Please sign in to comment.