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

hlx-file-writer

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hlx-file-writer - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

13

file.js
const fs = require('fs');
const path = require('path');
const {getPath} = require('./util');
const {tryCatch} = require('hlx-util');

@@ -17,6 +17,11 @@ function storeData({uri, data}, rootPath) {

if (path.isAbsolute(uri) && fs.existsSync(uri)) {
localPath = path.join(rootPath, path.basename(uri));
if (path.isAbsolute(uri)) {
localPath = path.join(rootPath, path.relative(rootPath, uri));
} else {
localPath = path.join(rootPath, getPath(uri));
const obj = tryCatch(
() => new URL(uri),
() => new URL(uri, rootPath),
() => null
);
localPath = path.join(rootPath, obj ? obj.pathname : uri);
}

@@ -23,0 +28,0 @@

{
"name": "hlx-file-writer",
"version": "0.0.5",
"version": "0.0.6",
"description": "A writable stream to save HLS playlists/segments as local files",

@@ -53,3 +53,4 @@ "main": "index.js",

"debug": "^4.1.1",
"hls-parser": "^0.4.3"
"hls-parser": "^0.4.4",
"hlx-util": "0.0.2"
},

@@ -56,0 +57,0 @@ "devDependencies": {

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