Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-titles

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-titles - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

1

index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc