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

rainbow

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rainbow - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

5

index.js

@@ -27,5 +27,6 @@ var path = require('path');

var ctrlDir = path.join(path.dirname(module.parent.filename), options.controllers || 'controllers');
var keyRE = new RegExp('(' + methods.join('|') + ')(?:\\s+((?:\\/(.+)\\/)|([^\\/].*[^\\/])))?', 'i')
var keyRE = new RegExp('(' + methods.join('|') + ')(?:\\s+((?:\\/(.+)\\/)|([^\\/].*[^\\/])))?', 'i');
var globOptions = options.glob || {};
glob.sync(ctrlDir + "/**/*.js").forEach(function (file) {
glob.sync(ctrlDir + "/**/*.js", globOptions).forEach(function (file) {
file = file.replace(/\.[^.]*$/, '');

@@ -32,0 +33,0 @@

2

package.json
{
"name": "rainbow",
"description": "Express router middleware for RESTful API base on certain folder path",
"version": "2.0.0",
"version": "2.1.0",
"author": "mytharcher <mytharcher@gmail.com>",

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -193,2 +193,5 @@ Rainbow

Options
----------
### Change default path ###

@@ -206,5 +209,23 @@

### Glob ###
From v2.1.0 you could use `glob` in options to config any option supported by npm [glob](https://www.npmjs.com/package/glob), such as excluding files.
~~~javascript
app.use(rainbow({
glob: {
ignore: [
'**.spec.js' // any spec file for test cases will be ignored from controller folder
]
}
}));
~~~
Change log
----------
### 2.1.0 ###
* Add `glob` option for more glob configurations.
### 2.0.0 ###

@@ -211,0 +232,0 @@

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