You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2026/03/31 09:22:55 UTC
(couchdb) 01/01: convert dreyfus-style arguments to index() in nouveau.js
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch nouveau-dreyfus-compat
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit f161ff40d31b297515f325b1b0c2f4edb0579605
Author: Robert Newson <rn...@apache.org>
AuthorDate: Tue Mar 31 10:22:36 2026 +0100
convert dreyfus-style arguments to index() in nouveau.js
---
share/server/nouveau.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/share/server/nouveau.js b/share/server/nouveau.js
index 8c75d4a25..2008fb08b 100644
--- a/share/server/nouveau.js
+++ b/share/server/nouveau.js
@@ -37,8 +37,16 @@ var Nouveau = (function () {
}
};
+ function upgradeDreyfusArgs(args) {
+ if (args.length == 2 || (args.length == 3 && typeof args[2] == 'object')) {
+ args.unshift(typeof args[1] == 'number' ? 'double' : 'text');
+ }
+ return args;
+ }
+
return {
index: function (doc) {
+ arguments = upgradeDreyfusArgs(arguments);
var type = arguments[0];
var name = arguments[1];