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

x-crawl

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x-crawl - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

6

dist/index.js

@@ -505,3 +505,3 @@ 'use strict';

requestRes.forEach(function (requestResItem) {
var _headers$contentType;
var _headers$contentType, _fileConfig$extension;
var id = requestResItem.id,

@@ -511,5 +511,5 @@ headers = requestResItem.headers,

var mimeType = (_headers$contentType = headers['content-type']) !== null && _headers$contentType !== void 0 ? _headers$contentType : '';
var suffix = mimeType.split('/').pop();
var fileExtension = (_fileConfig$extension = fileConfig.extension) !== null && _fileConfig$extension !== void 0 ? _fileConfig$extension : mimeType.split('/').pop();
var fileName = new Date().getTime().toString();
var filePath = path.resolve(fileConfig.storeDir, "".concat(fileName, ".").concat(suffix));
var filePath = path.resolve(fileConfig.storeDir, "".concat(fileName, ".").concat(fileExtension));
try {

@@ -516,0 +516,0 @@ fs.writeFileSync(filePath, data);

{
"name": "x-crawl",
"version": "0.3.1",
"version": "0.4.0",
"author": "CoderHxl",

@@ -5,0 +5,0 @@ "description": "XCrawl is a Nodejs multifunctional crawler library.",

@@ -20,3 +20,3 @@ # x-crawl

- [Example](#Example)
- [Core concepts](#Core concepts)
- [Core concepts](#Core-concepts)
* [XCrawl](#XCrawl)

@@ -314,3 +314,4 @@ + [Type](#Type-1)

fileConfig: {
storeDir: string
storeDir: string // store folder
extension?: string // filename extension
}

@@ -317,0 +318,0 @@ }

Sorry, the diff of this file is not supported yet

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