{"_id":"cstep","_rev":"16-ee193d0618f0a31cfb85826291402236","name":"cstep","description":"Usage","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0":{"name":"cstep","version":"0.0.0","description":"Usage","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/crcn/coffee-step.git"},"author":"","license":"BSD","dependencies":{"tq":"0.0.x"},"_id":"cstep@0.0.0","dist":{"shasum":"eb5f1ca40b787278ea654907d391ad48db24b44c","tarball":"https://registry.npmjs.org/cstep/-/cstep-0.0.0.tgz","integrity":"sha512-6GmiFi4F742McxodrqrKQYgarE3AaVoKI6cEfTDOVssNvOtEXECC5+8AYLzAlc6kuTpCp0UWFWUGHRhaiVDRgw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnWJBsmkULTknsylxs87GAEpt2xD72jbAtSuOpNLNOnQIgMxn8GMoEnOE2fiE0HacX/At6JZ85DGY812oVAjuWlrM="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}],"directories":{}},"0.0.1":{"name":"cstep","version":"0.0.1","description":"Usage","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/crcn/coffee-step.git"},"author":"","license":"BSD","dependencies":{"tq":"0.2.x"},"_id":"cstep@0.0.1","dist":{"shasum":"24f5224f15f494da9d0cdd1647597e594ba38c00","tarball":"https://registry.npmjs.org/cstep/-/cstep-0.0.1.tgz","integrity":"sha512-vObIB3Mj7t8SDLsRvbIg8uTYKNc8RUIe7wpJFu59dkpSmYBneG0eoL0PtL7ojTsETIZjQYNtrg4M4XFnRMAaRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH4Th49EzzmfWsvJCqwrJTvGmj67mMmN4l559zhdh5GDAiA2MJ4nM8Ze9sgNjB0jdoBRMMS04oCz8T3EtkiM1kwySw=="}]},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}]}},"readme":"Flow-control library used for coffeescript classes\n\nUsage\n\n```coffeescript\ncstep = require \"cstep\"\n\nclass Config\n  \n  ###\n    Function: Constructor\n\n    Parameters:\n      source - source of the configuration file\n\n  ###\n\n  constructor: (@source) ->\n\n  ###\n    Function: load\n\n    Loads the configuration file\n\n    Parameters:\n\n    next - called when load is complete\n  ###\n\n  load: cstep (next) ->\n    fs.readFile @source, (err, content) =>\n      @_content = JSON.parse content\n      next()\n\n  ###\n    Function: set\n\n    sets a value to the configuration file\n\n    Parameters:\n\n    next - called when set is complete (used mostly for cstep)\n  ###\n\n  set: cstep (key, value, next) ->\n    @_content[key] = value\n    next()\n\n  ###\n    Function: save\n\n    Parameters:\n\n    next - called when save is complete\n  ###\n\n  save: cstep (next) ->\n    fs.writeFile @source, JSON.stringify(@_content), next\n```\n\n\nUsing Config.coffee\n\n```coffeescript\nconfig = new Config __dirname + \"/config.json\"\nconfig.load().set(\"hello\", \"world\").save () ->\n  #successfully saved {\"hello\":\"world\"}\n```\n\n\n","maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"time":{"modified":"2022-06-14T05:13:46.791Z","created":"2013-01-25T19:38:02.368Z","0.0.0":"2013-01-25T19:38:04.984Z","0.0.1":"2013-04-02T01:59:00.214Z"},"repository":{"type":"git","url":"git://github.com/crcn/coffee-step.git"},"license":"BSD","readmeFilename":"README.md"}