express-titles
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -0,1 +1,2 @@ | ||
require('es6'); | ||
var title = function(app){ | ||
@@ -2,0 +3,0 @@ return function(title, options){ |
{ | ||
"name": "express-titles", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "A simple express middleware to manage website title with prefix and suffix control.", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "https://github.com/wvffle/express-titles.git" | ||
"url": "git+https://github.com/wvffle/express-titles.git" | ||
}, | ||
@@ -16,4 +16,22 @@ "keywords": [ | ||
], | ||
"author": "Casper Seweryn <casper@wvffle.net> (http://wvffle.net)", | ||
"license": "MIT" | ||
"author": { | ||
"name": "Casper Seweryn", | ||
"email": "casper@wvffle.net", | ||
"url": "http://wvffle.net" | ||
}, | ||
"license": "MIT", | ||
"readme": "# express-titles\r\nA simple express middleware to manage website title with prefix and suffix control.\r\n\r\n## Installation\r\n```sh\r\n$ npm install express-titles\r\n```\r\n\r\n## Usage\r\n### Basic example:\r\n```js\r\n//-- app.js\r\nvar express = require('express'), app = express();\r\nvar title = require('express-titles')(app);\r\n\r\n//-- layout configuration...\r\n\r\napp.get('/', title('Homepage'), function (req, res) {\r\n res.render('index');\r\n})\r\n```\r\n```sh\r\n//-- index.jade\r\ndoctype html\r\nhtml\r\n head\r\n title!= title\r\n body\r\n //-- ...\r\n```\r\n### Global prefix/suffix:\r\nAll you really need to do is to set it in the app:\r\n```js\r\n//-- app.js\r\n\r\n//-- ...\r\napp.set('prefix', 'wvffle.net');\r\napp.set('suffix', '<3');\r\n//-- ...\r\n```\r\nYou may want to change the separator so:\r\n```js\r\n//-- app.js\r\n\r\n//-- ...\r\napp.set('ps', ' | ');\r\n//-- ...\r\n```\r\n\r\n### Middleware options\r\nYou can set options through the middleware.\r\n - ` prefix ` - Prefix of the page (`true` || `false` || `String`)\r\n - ` suffix ` - Suffix of the page (`true` || `false` || `String`)\r\n - ` ps ` - Separator (`String`)\r\n\r\nExample:\r\n```js\r\n//-- app.js\r\n\r\n//-- ...\r\napp.set('prefix', 'wvffle.net');\r\napp.set('suffix', '<3');\r\n\r\napp.get('/', title('Homepage', { suffix: false, prefix: 'Dope', ps: ' '}), function (req, res) {\r\n//-- Dope Homepage\r\n res.render('index');\r\n})\r\n```\r\n\r\n## License\r\nMIT\r\n", | ||
"readmeFilename": "README.md", | ||
"gitHead": "8e1511227cdd9abe4f9e4f2bf25fb76f1616d31d", | ||
"bugs": { | ||
"url": "https://github.com/wvffle/express-titles/issues" | ||
}, | ||
"homepage": "https://github.com/wvffle/express-titles#readme", | ||
"_id": "express-titles@1.0.6", | ||
"scripts": {}, | ||
"_shasum": "9f4078cfeba496abb2a8eef4f9b2c92579094146", | ||
"_from": "express-titles@>=1.0.5 <2.0.0", | ||
"dependencies": { | ||
"es6": "0.0.7" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6504
38
1