couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [3/3] git commit: updated refs/heads/master to 61e0604
Date Sat, 18 May 2013 13:03:40 GMT
docs: improve language, consistency in CommonJS section


Branch: refs/heads/master
Commit: 61e0604f051a1aa0b1f5a7e14669c96db948afbd
Parents: f7064c0
Author: Dirkjan Ochtman <>
Authored: Sat May 18 15:01:03 2013 +0200
Committer: Dirkjan Ochtman <>
Committed: Sat May 18 15:03:18 2013 +0200

 share/doc/src/query-servers.rst |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/share/doc/src/query-servers.rst b/share/doc/src/query-servers.rst
index c0fcb08..64f9bfb 100644
--- a/share/doc/src/query-servers.rst
+++ b/share/doc/src/query-servers.rst
@@ -241,11 +241,11 @@ modules and functions:
 CommonJS Modules
-`CommonJS Modules <>`_ is the one of
-major CouchDB feature introduced in 0.11.0 version that allows to create modular
-design functions without needs to duplicate a lot of same functionality.
+Support for `CommonJS Modules <>`_
+(introduced in CouchDB 0.11.0) allows you to create modular design functions
+without the need for duplication of functionality.
-Example of CommonJS module that checks user permissions:
+Here's a CommonJS module that checks user permissions:
 .. code-block:: javascript
@@ -310,17 +310,17 @@ Example of CommonJS module that checks user permissions:
 Each module has access to additional global variables:
-- **module** (`object`): Contains information about stored module.
+- **module** (`object`): Contains information about the stored module
-  - **id** (`string`): Module id that is actually JSON path in ddoc context.
-  - **current** (`code`): Compiled module code object.
-  - **parent** (`object`): Parent frame.
-  - **exports** (`object`): Export statements.
+  - **id** (`string`): The module id; a JSON path in ddoc context
+  - **current** (`code`): Compiled module code object
+  - **parent** (`object`): Parent frame
+  - **exports** (`object`): Export statements
-- **exports** (`object`): Shortcut to ``module.exports`` object.
+- **exports** (`object`): Shortcut to the ``module.exports`` object
-Lets place module above within design document under `lib/validate` path.
-Now we could use it in our design functions:
+This module can be used after adding it to the design document, for example,
+under the `lib/validate` path. We may then use it in our view functions:
 .. code-block:: javascript

View raw message