Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[docs minor] small fixes

  • Loading branch information...
commit 23c7d5e8951ff56cbb75492d5b7234243c9d8ea2 1 parent bb94a54
@dscape authored
Showing with 8 additions and 40 deletions.
  1. +0 −36 logging.js
  2. +3 −1 package.json
  3. +5 −3 samples/README.md
View
36 logging.js
@@ -1,36 +0,0 @@
-// Simple event+strategy-based logging for NanoCouch
-// written by: Derek Perez
-var verbose = (process.env.NANO_ENV==='testing');
-
-// snippet by Marak Squires.
-// MIT Licenced, Nodejitsu
-function randomString(len, charSet) {
- charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- var str = '';
- for (var i = 0; i < len; i++) {
- var randomPoz = Math.floor(Math.random() * charSet.length);
- str += charSet.substring(randomPoz,randomPoz+1);
- }
- return str;
-}
-
-module.exports = function logging(cfg) {
- var logStrategy = cfg ? cfg.log : undefined;
- this.cfg = cfg;
- if (typeof logStrategy !== 'function') {
- if(verbose) {
- logStrategy = function consoleLog(eventId, args) {
- console.log(eventId, args);
- };
- }
- else logStrategy = function noop(){};
- }
-
- return function logEvent(prefix) {
- var eventId = (prefix ? prefix + '-' : '') + randomString(10);
- return function log() {
- logStrategy.call(this, eventId,
- [].slice.call(arguments,0)); // convert arguments into array
- };
- };
-};
View
4 package.json
@@ -29,7 +29,9 @@
, "errs" : "0.2.x"
}
, "scripts" :
- { "test" : "ls -tr tests/*/*.js | NOCK=on xargs -I{} node {}" }
+ { "test" : "ls -tr tests/*/*.js | NOCK=on xargs -I{} node {}"
+ , "nock_off" : "ls -tr tests/*/*.js | NANO_ENV=testing xargs -I{} node {}"
+ }
, "main" : "./nano.js"
, "engines" : { "node": ">=0.3.6" }
}
View
8 samples/README.md
@@ -1,5 +1,7 @@
-# Samples
+# aamples
-If you have a sample please feel free to send a pull request.
+if you have a sample please feel free to send a pull request.
-Also the tests are very concise and helpful. I would recommend taking a peek.
+also the tests are very concise and helpful.
+
+i would recommend taking a peek.
Please sign in to comment.
Something went wrong with that request. Please try again.