Переглянути джерело

Refs #1879: updated mungedb-aggregate docs

Kyle P Davis 12 роки тому
батько
коміт
281f4bb736
3 змінених файлів з 9 додано та 10 видалено
  1. 5 6
      README.md
  2. 3 0
      lib/index.js
  3. 1 4
      package.json

+ 5 - 6
README.md

@@ -1,15 +1,14 @@
-munge
-=====
-A JavaScript data munging pipeline based on the MongoDB aggregation framework.
+mungedb-aggregation
+===================
+A JavaScript data aggregation pipeline based on the MongoDB aggregation framework.
 
 In general, this code is a port from the MongoDB C++ code (v2.4.0) to JavaScript.
 
 
-
 exports
 -------
-**TODO:** document the major exports and a little about each here
-
+aggregate
+Aggregator
 
 
 Deviations

+ 3 - 0
lib/index.js

@@ -2,12 +2,15 @@
 var Aggregator = require("./Aggregator");
 
 module.exports = (function(){
+	// functional-style interface
 	function aggregate(ops, inputs) {
 		var aggregator = new Aggregator(ops);
 		if(inputs)
 			return aggregator.execute(inputs);
 		return aggregator.execute.bind(aggregator);
 	}
+	// package-style interface
 	aggregate.Aggregator = Aggregator;
+	aggregate.aggregate = aggregate;
 	return aggregate;
 })();

+ 1 - 4
package.json

@@ -1,7 +1,7 @@
 {
 	"name": "mungedb-aggregate",
 	"version": "0.4.6+2013.04.19",
-	"description": "A JavaScript data munging pipeline based on the MongoDB aggregation framework.",
+	"description": "A JavaScript data aggregation pipeline based on the MongoDB aggregation framework.",
 	"author": "Rivera Group <support@riverainc.com>",
 	"contributors": [
 		"Adam Bell <ABell@riverainc.com>",
@@ -39,8 +39,5 @@
 		"node": ">=0.8"
 	},
 	"config": {
-		"test_syntax": true,
-		"test_unit": true,
-		"test_coverage": true
 	}
 }