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

cccpurge

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cccpurge - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

21

index.js

@@ -25,5 +25,4 @@ var url = require('url')

// flatten list and filter out any falsy values
routes = routes.reduce(function flatten (flat, route) {
return flat.concat(route)
}, Array.isArray(opts.urls) ? opts.urls : [opts.urls]).filter(Boolean)
var initial = Array.isArray(opts.urls) ? opts.urls : [opts.urls]
routes = flatten(routes, initial).filter(Boolean).map(resolveRoot)

@@ -48,8 +47,5 @@ if (routes.length <= limit) {

function resolveRoute (route, done) {
if (!/\/:/.test(route)) return done(null, resolveRoot(route))
if (!/\/:/.test(route)) return done(null, route)
assert(opts.resolve, 'cccpurge: opts.resolve should be a function')
opts.resolve(route, function (err, routes) {
if (!Array.isArray(routes)) routes = [routes]
done(err, routes.map(resolveRoot))
})
opts.resolve(route, done)
}

@@ -110,1 +106,10 @@

}
// flatten array
// (arr, initial?) -> arr
function flatten (arr, initial) {
initial = initial || []
return arr.reduce(function (flat, value) {
return flat.concat(value)
}, initial)
}
{
"name": "cccpurge",
"version": "1.3.0",
"version": "1.4.0",
"description": "Choo Cloudflare Cache Purge – purge all routes served by choo app",

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

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