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.0 to 1.0.6

LICENSE

20

index.js

@@ -6,17 +6,19 @@ var title = function(app){

if(app.get('suffix')==null) app.set('suffix', '');
if(app.get('ps')==null) app.set('ps', ' | ');
return function (req, res, next) {
if($title){
var _title = $title, title = $title;
var _title = $title, title = $title, ps = app.get('ps');
if($options){
if($options.ps != null) ps = $options.ps;
if($options.prefix != null){
if($options.prefix === true) title = app.get('prefix')+app.get('ps')+title;
else if($options.prefix !== false) title = $options.prefix+app.get('ps')+title;
} else if(app.get('prefix')) title = app.get('prefix')+app.get('ps')+title;
if($options.prefix === true) title = app.get('prefix')+ps+title;
else if($options.prefix !== false) title = $options.prefix+ps+title;
} else if(app.get('prefix')) title = app.get('prefix')+ps+title;
if($options.suffix != null){
if($options.suffix === true) title += app.get('ps')+app.get('suffix');
else if($options.suffix !== false) title += app.get('ps')+$options.suffix;
} else if(app.get('suffix')) title += app.get('ps')+app.get('suffix');
if($options.suffix === true) title += ps+app.get('suffix');
else if($options.suffix !== false) title += ps+$options.suffix;
} else if(app.get('suffix')) title += ps+app.get('suffix');
}else{
if(app.get('prefix')) title = app.get('prefix')+app.get('ps')+title;
if(app.get('suffix')) title += app.get('ps')+app.get('suffix');
if(app.get('prefix')) title = app.get('prefix')+ps+title;
if(app.get('suffix')) title += ps+app.get('suffix');
}

@@ -23,0 +25,0 @@ var params = title.match(/\:(.+?)(\/|(?=\s|$))/g);

{
"name": "express-titles",
"version": "1.0.0",
"description": "A simple express middleware to manage website title.",
"version": "1.0.6",
"description": "A simple express middleware to manage website title with prefix and suffix control.",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/wvffle/express-titles.git"
},
"keywords": [

@@ -7,0 +11,0 @@ "express",

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