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

fs-merger

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-merger - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

18

index.js

@@ -9,2 +9,3 @@ "use strict";

let prefix = '';
let getDestinationPath = '';
if (typeof item == 'string') {

@@ -15,6 +16,8 @@ root = item;

prefix = item.prefix || '';
getDestinationPath = item.getDestinationPath
}
return {
root: root,
prefix: prefix
prefix: prefix,
getDestinationPath: getDestinationPath
}

@@ -50,14 +53,16 @@ }

if (this.MAP[basePath]) {
let { root, prefix } = this.MAP[basePath];
let { root, prefix, getDestinationPath } = this.MAP[basePath];
return {
path: root + '/' + filePath,
prefix: prefix
prefix: prefix,
getDestinationPath: getDestinationPath
}
}
for (let i=0; i < _dirList.length; i++) {
let { root, prefix } = getRootAndPrefix(_dirList[i]);
let { root, prefix, getDestinationPath } = getRootAndPrefix(_dirList[i]);
if (basePath == root) {
return {
path: root + '/' + filePath,
prefix: prefix
prefix: prefix,
getDestinationPath: getDestinationPath
}

@@ -69,3 +74,4 @@ }

path: fullPath,
prefix: prefix
prefix: prefix,
getDestinationPath: getDestinationPath
};

@@ -72,0 +78,0 @@ }

{
"name": "fs-merger",
"version": "1.0.0",
"version": "1.0.1",
"description": "Reads files from a real location",

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

@@ -1,2 +0,3 @@

##Usage
## Usage
```js

@@ -21,4 +22,3 @@ let FSMerge = require('fs-merger');

let content = fs.readFileSync('b.txt); //content of test-1/b.txt
let conetntB = fs.readFileSync('a.txt') // content of test-3/a.txt; here we merge left to right, duplicate files are overwritten
let contentA = fs.readFileSync('a.txt') // content of test-3/a.txt; here we merge left to right, duplicate files are overwritten
```
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