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

serve-index

Package Overview
Dependencies
Maintainers
6
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serve-index - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

6

HISTORY.md

@@ -0,1 +1,7 @@

1.4.0 / 2014-10-03
==================
* Add `dir` argument to `filter` function
* Support using tokens multiple times
1.3.1 / 2014-10-01

@@ -2,0 +8,0 @@ ==================

12

index.js

@@ -145,3 +145,5 @@

if (!hidden) files = removeHidden(files);
if (filter) files = files.filter(filter);
if (filter) files = files.filter(function(filename, index, list) {
return filter(filename, index, list, path);
});
files.sort();

@@ -176,6 +178,6 @@

str = str
.replace('{style}', style.concat(iconStyle(files, icons)))
.replace('{files}', html(files, dir, icons, view))
.replace('{directory}', dir)
.replace('{linked-path}', htmlPath(dir));
.replace(/\{style\}/g, style.concat(iconStyle(files, icons)))
.replace(/\{files\}/g, html(files, dir, icons, view))
.replace(/\{directory\}/g, dir)
.replace(/\{linked-path\}/g, htmlPath(dir));

@@ -182,0 +184,0 @@ var buf = new Buffer(str, 'utf8');

{
"name": "serve-index",
"description": "Serve directory listings",
"version": "1.3.1",
"version": "1.4.0",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -38,3 +38,7 @@ # serve-index

Apply this filter function to files. Defaults to `false`.
Apply this filter function to files. Defaults to `false`. The `filter` function
is called for each file, with the signature `filter(filename, index, files, dir)`
where `filename` is the name of the file, `index` is the array index, `files` is
the array of files and `dir` is the absolute path the file is located (and thus,
the directory the listing is for).

@@ -41,0 +45,0 @@ ##### hidden

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