{"_id":"dysf.utils","_rev":"32-21b9dfa57d82b50ae882dc0a96f952d9","name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.1","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"_id":"dysf.utils@0.0.1","dist":{"shasum":"cf63f1fb5887e19a971a708256a93725cc836fcb","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.1.tgz","integrity":"sha512-DELqnOvJGtHrrFhzXljQutpCysG6BHXxBy/2bCAVIuM1nR9ksdqhKLouUaxsnZti9rt54+y9zQrQiERXSz9/Eg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEilC6WOh/v0TQpSjypkV+KA8ftEQx06jIhidbIclGPxAiA1WBqM0oarOzX0VAb220R6kM+dIhcWxa8VNaKFd4xhAQ=="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"dysf","email":"info@dysf.co"},"directories":{}},"0.0.2":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.2","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"_id":"dysf.utils@0.0.2","dist":{"shasum":"23e8f83685a799c5a5a4e8b86b97c1f912708309","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.2.tgz","integrity":"sha512-WXOMcw5f3qbtizGKOIgAPMdqipBK1ObUNpxBkfwWS7MXiYlazVbEch9f2RLyyKPChuRM9kECZtq3xxOqQPc/Ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3tII7bej7S9+VVesyVNJD03Xd7e8fdxv7lgPe2GMPjAiEAu2cNeXBfOKX+1qKRseeTyh+zlfQO3st6+XCiL8HFkXg="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"dysf","email":"info@dysf.co"},"directories":{}},"0.0.3":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.3","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"_id":"dysf.utils@0.0.3","dist":{"shasum":"9f79c8427762cb5667817d6f55d5b47cafe0d0cc","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.3.tgz","integrity":"sha512-O1P6iJAepb5NOvpMXqpbSAufBseyp2KWo0L43twtalA/tg4KM0SOz3xE5Clm2ILC+deyPtYZoWuu7ffYri8EkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7VuLdv7VpScl+72AbXReZ0KM2pU9CZe91tyLsu2uN+wIhAOn/BGKA+LRP4+ry+bmh/aTVox9vDVMKwmxC8Qm9KwLv"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"dysf","email":"info@dysf.co"},"directories":{}},"0.0.4":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.4","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"callsite":"x.x.x"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"_id":"dysf.utils@0.0.4","dist":{"shasum":"6463987ee3eee3861a5e08db5ae4d40b5f44ead0","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.4.tgz","integrity":"sha512-nBIi86RI60HqhScZHLZWFMDL7W27hlaPO7sLTLugFMBe90j2HIA7Q/c69BWdUHWAQLqg1qyZHTU8PFYv7ivFyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAKkqzRUor9H5v8hyi5mCz1QKwO2m+I1tufRKmVbA1HgIgV3q992+gLMdceoryOV/hZ4TIzo+K3ICoPPzodZSlO4Y="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"dysf","email":"info@dysf.co"},"directories":{}},"0.0.5":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.5","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"callsite":"x.x.x"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"_id":"dysf.utils@0.0.5","dist":{"shasum":"55e7ebbbd39eb40bfcc283cd7081f518159e435d","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.5.tgz","integrity":"sha512-qgQ/WHLgQouUuTP9z8+C3aYNkr0c3IRJsuz93EhdWcFgbMLE7WguFzZH0z4XjLqCc/G1YAB5disuuQxv3fOqzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDvJATSP1/BnIPR8ny2rujPmjwH2FlCDhx+15UfaGUh6AiA6AtWUNasKrTXji0co0154DfFbubGXSQNj8pshRpILoA=="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"dysf","email":"info@dysf.co"},"directories":{}},"0.0.6":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.6","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"callsite":"x.x.x"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"_id":"dysf.utils@0.0.6","dist":{"shasum":"d0aeef273e70e1f37f537c464b0023b5d180d3dd","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.6.tgz","integrity":"sha512-6a2A/KmbgbJdl2c5WdYQeDzmEuddLSjDBEIJGcCs7uNZF+hPH8iZsO51+QbZ6WOoDiHSQJOHaMH+aoE0tDL8mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCf/3qosMByO+Y03O4OhzUpgte8t/0OzSus2h6Cr/P0XAIhAOUlDoYYYYamtLt+03gq5fOF1RVqXSy+zfQI7Odnfypa"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"dysf","email":"info@dysf.co"},"directories":{}},"0.0.7":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.7","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"callsite":"x.x.x"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"_id":"dysf.utils@0.0.7","dist":{"shasum":"3f1046530f419fef9a77f96f5eed2bcea667fa65","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.7.tgz","integrity":"sha512-H3Ti/JO8G/Vs5WUAjobmYQGTHfQ9wIMYWsz5NZplnIjIOTfeXQN4pvEF6G1lymeTpcVFNVTH3+nhkPhGISURJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3SnwUattQwBUzpl4D1jrZz9p+2F+wmXGASogGqjDarAiEA6lTTUqt2HFNUYwIxeZ7hJo9XldPeLrGmNhr7/R5AvCU="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"dysf","email":"info@dysf.co"},"directories":{}},"0.0.8":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.8","author":{"name":"dysf","email":"info@dysf.co"},"maintainers":[{"name":"dysf","email":"info@dysf.co"},{"name":"khilnani","email":"nik@khilnani.org"}],"repository":{"type":"git","url":"https://github.com/dysf/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"vows":"0.7.0","callsite":"0.x.x"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"scripts":{"test":"vows --spec"},"bugs":{"url":"https://github.com/dysf/dysf.utils/issues"},"_id":"dysf.utils@0.0.8","dist":{"shasum":"21c4596ce2f0302f843d1f94eaddf288e2430e9f","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.8.tgz","integrity":"sha512-DeRSxPCikggvookoQtJMjjOsej8C8GnLGLGzgDg/rvSs+wBdB+mqAeAZ/PWp7ZfYW3VEQkCd0VS5z5UJ2aqnCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0uUECgU0+7/kpLNxCb2P75SwZpl9PgnEiAX4N47kYwgIgW+66Dpp6sqx/Mb5tnkDhnxKwrfSmFLSOiMlFrV6Z/mo="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"khilnani","email":"nik@khilnani.org"}},"0.0.9":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.0.9","author":{"name":"Nik Khilnani","email":"nik@khilnani.org"},"maintainers":[{"name":"dysf","email":"info@dysf.co"},{"name":"khilnani","email":"nik@khilnani.org"}],"repository":{"type":"git","url":"https://github.com/khilnani/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"vows":"0.7.0","callsite":"0.x.x"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"scripts":{"test":"vows --spec"},"bugs":{"url":"https://github.com/khilnani/dysf.utils/issues"},"_id":"dysf.utils@0.0.9","dist":{"shasum":"467dc337f8f8d286d9a410f0ff6ba6bb9aded53f","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.0.9.tgz","integrity":"sha512-viiTPE0VWcLsuKnS8pIQWIR/LYVqdKY7vj8C6cK8ZeO82DgAyzENV8y0D8g5w+09wEn5EJCq9q0Ny1MmFxwlbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyhtCNFL+TEf98FkRMA6SM/i0DpmkUHfKHbv1rmWDSqwIgQw9FMEQ6kS35W+28uaNW4IIKzIwxNIaIc5JezqB/5uE="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"khilnani","email":"nik@khilnani.org"}},"0.1.0":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.1.0","author":{"name":"Nik Khilnani","email":"nik@khilnani.org"},"maintainers":[{"name":"dysf","email":"info@dysf.co"},{"name":"khilnani","email":"nik@khilnani.org"}],"repository":{"type":"git","url":"https://github.com/khilnani/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"vows":"0.7.0","callsite":"0.x.x","chalk":"0.4.0"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"scripts":{"test":"vows --spec"},"bugs":{"url":"https://github.com/khilnani/dysf.utils/issues"},"_id":"dysf.utils@0.1.0","dist":{"shasum":"79d134136425a308ccabf70d7be918602e3c91cb","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.1.0.tgz","integrity":"sha512-hoMrqpF2eGkLicfHzxNPt3WJov4h28bX52JrhOwLq0qS6c/K1nPRmgYrRx1bOwvN4l52TnBVaN1Pt9+Or9Ekjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnOjIShppbDc7+J8BdOhhkBMTDM4EuPk0EbRSZcyzMsAIhAOtMuNBN0tA637RqNzbfvEP9AU3I8zjottdWb7aJOuez"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"khilnani","email":"nik@khilnani.org"}},"0.1.1":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.1.1","author":{"name":"Nik Khilnani","email":"nik@khilnani.org"},"maintainers":[{"name":"dysf","email":"info@dysf.co"},{"name":"khilnani","email":"nik@khilnani.org"}],"repository":{"type":"git","url":"https://github.com/khilnani/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"vows":"0.7.0","callsite":"0.x.x","chalk":"0.4.0"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"scripts":{"test":"vows --spec"},"bugs":{"url":"https://github.com/khilnani/dysf.utils/issues"},"homepage":"https://github.com/khilnani/dysf.utils","_id":"dysf.utils@0.1.1","_shasum":"863f8425a41a5d592d25b0d6b084ec6a7c460ac5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"khilnani","email":"nik@khilnani.org"},"dist":{"shasum":"863f8425a41a5d592d25b0d6b084ec6a7c460ac5","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.1.1.tgz","integrity":"sha512-619f7XwM7vhjl74z+LwInVa4iiltPfNqcm8+LawusD6urhHwEntLVy8U2Inl2TdIvutIfXi9JMMwBU5Cx4tjEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdWKtv+8GvyF/bFmif9Mpfa5qqu39Vs27jPYDuTZFPSwIhAP6OHRUAhqs7upWEMFGKgQMecOVORd5glhsiKNi00ItM"}]}},"0.1.2":{"name":"dysf.utils","description":"Custom dysfunctional utilities for node.js","version":"0.1.2","author":{"name":"Nik Khilnani","email":"nik@khilnani.org"},"maintainers":[{"name":"dysf","email":"info@dysf.co"},{"name":"khilnani","email":"nik@khilnani.org"}],"repository":{"type":"git","url":"https://github.com/khilnani/dysf.utils.git"},"keywords":["logging","utilities","node.js"],"dependencies":{"vows":"0.7.0","callsite":"0.x.x","chalk":"0.4.0"},"main":"./lib/dysf.utils","engines":{"node":">= 0.8.0"},"scripts":{"test":"vows --spec"},"bugs":{"url":"https://github.com/khilnani/dysf.utils/issues"},"homepage":"https://github.com/khilnani/dysf.utils","_id":"dysf.utils@0.1.2","_shasum":"f038e0cd0629857d62d20db601bba52c78c2c7df","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"khilnani","email":"nik@khilnani.org"},"dist":{"shasum":"f038e0cd0629857d62d20db601bba52c78c2c7df","tarball":"https://registry.npmjs.org/dysf.utils/-/dysf.utils-0.1.2.tgz","integrity":"sha512-GBg0/3tOY9r93JbYDEn9MMBJypgqhU+dEf0Ma/Uqkt35w4zkJXre/wJCoDWgOaRyugU5KzBOg9L2LPzfbc2FiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErfzKvsecCztNC3EIBgPImcqaSSZQq+3uy7Df/uQjLjAiA1RZyQILTWzdUSNReb+iEt0zG9XbacrOVURmvWEhBvSQ=="}]}}},"readme":"**Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n- [dysf.utils [![Build Status](https://travis-ci.org/khilnani/dysf.utils.png?branch=master)](https://travis-ci.org/khilnani/dysf.utils)](#dysfutils-!build-statushttpstravis-ciorgkhilnanidysfutilspngbranch=masterhttpstravis-ciorgkhilnanidysfutils)\n- [Usage](#usage)\n- [API](#api)\n\t- [logger](#logger)\n\t- [utils](#utils)\n\t- [mock](#mock)\n- [Installation](#installation)\n\t- [Global](#global)\n\t- [Project](#project)\n\ndysf.utils [![Build Status](https://travis-ci.org/khilnani/dysf.utils.png?branch=master)](https://travis-ci.org/khilnani/dysf.utils)\n==========\n\nCustom dysfunctional utilities for node.js !!!\n\nUsage\n=========\n\n- utils - <code>utils = require(\"dysf.utils\").utils;</code>\n- logger - <code>logger = require(\"dysf.utils\").logger;</code>\n- mock - <code>mock = require(\"dysf.utils\").mock;</code>\n\nAPI\n==========\n\nlogger\n----------\n\nA key reason for creating my own logger was to print file path and line numbers from where a log message was called.\nAdditionally it prints the date/time and also has a few additional levels of logging.\n\n- logger.setLogLevel( id ) \n  - 0: system, 1: error, 2: warn, 3: event, 4: info, 5: debug, 6: trace. Default is 4 (info)\n- logger.system ( msg | obj ) \n  - Useful for system level notifications.\n- logger.error ( msg | obj )\n- logger.warn ( msg | obj )\n- logger.event ( msg | obj )\n  - Recommended for key events like new tranactions / sessions / requests etc.\n- logger.info ( msg | obj )\n  - Recommended for notable phases within a transaction like handlers, methods etc.\n- logger.debug ( msg | obj )\n  - Recommended for useful property values or callback tracking.\n- logger.trace ( msg | obj )\n  - Recommended for detailed debugging like printing object contents.\n\nutils\n----------\n\nA random utility collection of one. Render a file to the Response \nin cases where you are not using a micro or mega framework.\n\n- utils.renderFile ( response, path, replaceParams, callback )\n  - response: Http Response\n  - path: path to file\n  - replaceParams: A hash of Ket Value pairs with the key representing the string to replace with the Value.\n  - callback: to help with callback hell.\n\nmock\n----------\n\nThe start of a few mock objects primarily useful in quick and dirty unit testing.\n\n- mock.response ( text )\n   \n\n\nInstallation\n=======\n\nGlobal\n--------- \n- Run: <code>sudo npm install dysf.utils -g</code>\n- Usually installed at - /usr/local/lib/node_modules/dysf.utils\n\nProject\n---------\n- Add <code>\"dysf.utils\": \"x.x.x\"</code> to the dependencies section of your project's package.json \n  - Example <code>\"dependencies\": { \"dysf.utils\": \"x.x.x\" }</code>\n- Run <code>npm install</code> in the director with your package.json\n- Usually installed at - PROJECT_DIR/node_modules/dysf.utils\n\n","maintainers":[{"name":"dysf","email":"info@dysf.co"},{"name":"khilnani","email":"nik@khilnani.org"}],"time":{"modified":"2022-06-16T02:59:29.395Z","created":"2012-12-25T17:54:03.321Z","0.0.1":"2012-12-25T17:54:04.248Z","0.0.2":"2012-12-25T17:57:51.508Z","0.0.3":"2012-12-25T18:16:04.658Z","0.0.4":"2012-12-27T01:33:53.313Z","0.0.5":"2012-12-27T01:39:27.053Z","0.0.6":"2012-12-27T01:49:32.740Z","0.0.7":"2012-12-27T01:54:00.934Z","0.0.8":"2013-07-21T19:57:57.617Z","0.0.9":"2013-07-21T20:01:27.947Z","0.1.0":"2014-02-04T02:41:31.660Z","0.1.1":"2014-11-17T01:38:11.221Z","0.1.2":"2014-11-17T02:08:18.490Z"},"author":{"name":"Nik Khilnani","email":"nik@khilnani.org"},"repository":{"type":"git","url":"https://github.com/khilnani/dysf.utils.git"},"readmeFilename":"README.md","homepage":"https://github.com/khilnani/dysf.utils","keywords":["logging","utilities","node.js"],"bugs":{"url":"https://github.com/khilnani/dysf.utils/issues"}}