New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ceicc/range

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ceicc/range - npm Package Compare versions

Comparing version 3.0.0-beta.8 to 3.0.0-no-types-dir

lib/index.d.ts

4

package.json
{
"name": "@ceicc/range",
"version": "3.0.0-beta.8",
"version": "3.0.0-no-types-dir",
"description": "http range request handler",

@@ -33,3 +33,2 @@ "exports": "./lib/index.js",

"lib/",
"types/",
"README.md",

@@ -39,3 +38,2 @@ "LICENSE",

],
"types": "types/",
"engines": {

@@ -42,0 +40,0 @@ "node": ">=14.16"

@@ -1,8 +0,11 @@

# range
A static files middleware
# Range
Middleware for serving static files
[![NPM Downloads per month](https://img.shields.io/npm/dm/@ceicc/range?logo=npm&style=flat-square&color=088)](https://npmjs.com/package/@ceicc/range)
[![Module type](https://img.shields.io/badge/Module-ESM-informational?style=flat-square)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)
## Installation
```bash
npm i @ceicc/range
```
npm i @ceicc/range@next
```

@@ -14,7 +17,4 @@ ## Usage

```js
import range from "@ceicc/range"
import { range } from "@ceicc/range"
// CommonJS
// const range = require("@ceicc/range")
app.get('/public/*', range())

@@ -131,3 +131,3 @@

the compression method will be determined based on the request's `accept-encoding` header using npm package `negotiator`.
the compression method will be determined based on the request's [`accept-encoding`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/accept-encoding) header using npm package [`negotiator`](https://npmjs.com/package/negotiator).

@@ -147,9 +147,13 @@ #### `dateHeader`

```js
import { fileURLToPath } from "node:url"
import { join, dirname } from "node:path"
import express from "express"
import range from "@ceicc/range"
import { range } from "@ceicc/range"
const app = express()
app.get('*', range({ baseDir: './public/' }))
const __dirname = dirname(fileURLToPath(import.meta.url))
app.get('*', range({ baseDir: join(__dirname, "public") }))
app.use((error, req, res, next) => {

@@ -160,3 +164,3 @@ console.error(error)

app.listen(80, () => console.log("server listening on localhost"))
app.listen(3000, () => console.log("server listening on http://localhost:3000"))
```
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