[Pkg-javascript-commits] [node-leveldown] 136/492: proper setImmediate/process.nextTick compatibility
Andrew Kelley
andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.
commit a501ee7e22fed5a1fdf401ad1c1272f7ec246a28
Author: Rod Vagg <rod at vagg.org>
Date: Sun Dec 30 16:54:46 2012 +1100
proper setImmediate/process.nextTick compatibility
---
lib/read-stream.js | 1 +
lib/util.js | 13 ++++++++-----
lib/write-stream.js | 1 +
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/read-stream.js b/lib/read-stream.js
index 023110e..071150d 100644
--- a/lib/read-stream.js
+++ b/lib/read-stream.js
@@ -6,6 +6,7 @@ var Stream = require('stream').Stream
, toEncoding = require('./util').toEncoding
, toSlice = require('./util').toSlice
, extend = require('./util').extend
+ , setImmediate = require('./util').setImmediate
, defaultOptions = { keys: true, values: true }
diff --git a/lib/util.js b/lib/util.js
index ed70030..b9155d4 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -41,10 +41,13 @@ var encodings = 'hex utf8 utf-8 ascii binary base64 ucs2 ucs-2 utf16le utf-16le'
.on('error', callback ? callback : function (err) { throw err })
}
+ , setImmediate = global.setImmediate || process.nextTick
+
module.exports = {
- encodings : encodings
- , toSlice : toSlice
- , toEncoding : toEncoding
- , extend : extend
- , copy : copy
+ encodings : encodings
+ , toSlice : toSlice
+ , toEncoding : toEncoding
+ , extend : extend
+ , copy : copy
+ , setImmediate : setImmediate
}
\ No newline at end of file
diff --git a/lib/write-stream.js b/lib/write-stream.js
index f8bdd51..e904a6e 100644
--- a/lib/write-stream.js
+++ b/lib/write-stream.js
@@ -4,6 +4,7 @@ var Stream = require('stream').Stream
, concatStream = require('concat-stream')
, extend = require('./util').extend
+ , setImmediate = require('./util').setImmediate
, defaultOptions = {}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git
More information about the Pkg-javascript-commits
mailing list