{"id":16731649,"url":"https://github.com/missinglink/dubstep","last_synced_at":"2025-03-15T18:26:23.334Z","repository":{"id":6471604,"uuid":"7711527","full_name":"missinglink/dubstep","owner":"missinglink","description":"A simple two step view pattern for expressjs","archived":false,"fork":false,"pushed_at":"2013-01-20T02:22:55.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T08:13:43.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/missinglink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-20T01:57:55.000Z","updated_at":"2017-02-26T10:02:56.000Z","dependencies_parsed_at":"2022-09-04T17:22:21.581Z","dependency_job_id":null,"html_url":"https://github.com/missinglink/dubstep","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fdubstep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fdubstep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fdubstep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fdubstep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/missinglink","download_url":"https://codeload.github.com/missinglink/dubstep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243772729,"owners_count":20345705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:38:22.026Z","updated_at":"2025-03-15T18:26:23.306Z","avatar_url":"https://github.com/missinglink.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DubStep\n\nA kind of response middleware for expressjs.\n\nLets you seperate and re-use view specific logic, keeping it out of your controllers.\n\nRecipes coming soon.\n\n## Example Steps\n\n### A basic step used to set HTML title\n\n```javascript\n  var title = function( title, function(req, res, step){\n    res.title = 'Company -- ' + title;\n    step();\n  });\n```\n\n### A view renderer\n\n```javascript\n  var html = function(req, res, step){\n    res.send( '\u003chtml\u003e\u003ctitle\u003e'+res.title+'\u003c/title\u003e\u003cbody\u003e\u003ch1\u003e'+res.title+'\u003c/h1\u003e\u003c/html\u003e' );\n  };\n```\n\n## Define the steps in your express controller\n\n```javascript\napp.get('/home', function(req, res){\n  res.dub.step( title( 'Home Page' ) )\n         .step( html )\n         .step();\n});\n```\n\n## Tests\n\n```bash\nnpm test\n```\n\n```bash\ndubstep\n  ✓ should be a function that is compatible with connect middleware \n  middleware\n    ✓ should define a function dub.step() \n    ✓ should call next() once \n  steps\n    ✓ should behave like a queue (first in first out) \n    ✓ should stop when a step neglects to call the next step() \n    ✓ should have access to req and res from connect \n\n6 tests complete (3 ms)\n```\n\n## License\n\nReleased under the MIT(Poetic) Software license\n\n    This work 'as-is' we provide.\n    No warranty express or implied.\n    Therefore, no claim on us will abide.\n    Liability for damages denied.\n\n    Permission is granted hereby,\n    to copy, share, and modify.\n    Use as is fit,\n    free or for profit.\n    These rights, on this notice, rely. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Fdubstep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmissinglink%2Fdubstep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Fdubstep/lists"}