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

@filemonger/main

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@filemonger/main - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

1

dist/index.d.ts

@@ -5,1 +5,2 @@ import { Filemonger, IDict, Transform } from "@filemonger/types";

export declare function makeFilemonger<Opts extends IDict<any>>(transform: Transform<Opts>): Filemonger<Opts>;
export declare const passthrumonger: Filemonger<{}>;

15

dist/index.js

@@ -7,5 +7,5 @@ "use strict";

const rxjs_1 = require("rxjs");
const { f, tmp, symlinkFile, filesInDir } = helpers;
function makeFilemonger(transform) {
const { f, tmp, symlinkFile, filesInDir } = helpers;
return (patternOrFileStream = "**/*", opts = {}) => {
return (patternOrFileStream = "**/*.*", opts = {}) => {
const unit = (srcDir, destDir) => {

@@ -17,3 +17,3 @@ const resolvedSrcDir = f.dir(f.abs(path_1.resolve(process.cwd(), srcDir)));

: patternOrFileStream;
return rxjs_1.Observable.defer(() => transform(file$, resolvedSrcDir, finalDestDir, opts));
return transform(file$, resolvedSrcDir, finalDestDir, opts);
};

@@ -33,10 +33,8 @@ const run = (srcDir, destDir, complete) => {

};
const bind = fn => {
const bindingmonger = makeFilemonger((_, srcDir, destDir) => tmp(tmpDir => fn(unit(srcDir, tmpDir)).unit(tmpDir, destDir)));
const bind = mongerFactory => {
const bindingmonger = makeFilemonger((_, srcDir, destDir) => tmp(tmpDir => mongerFactory(unit(srcDir, tmpDir)).unit(tmpDir, destDir)));
return bindingmonger();
};
const bypass = (predicate, fn) => {
const inversePredicate = x => !predicate(x);
const passthrumonger = makeFilemonger((file$, srcDir, destDir) => file$.delayWhen(file => symlinkFile(f.fullPath(f.abs(path_1.join(srcDir, file))), f.fullPath(f.abs(path_1.join(destDir, file))))));
return multicast(f$ => fn(f$.filter(predicate)), f$ => passthrumonger(f$.filter(inversePredicate)));
return multicast(f$ => fn(f$.filter(predicate)), f$ => exports.passthrumonger(f$.filter(f => !predicate(f))));
};

@@ -66,1 +64,2 @@ const merge = (...others) => {

exports.makeFilemonger = makeFilemonger;
exports.passthrumonger = makeFilemonger((file$, srcDir, destDir) => file$.delayWhen(file => symlinkFile(f.fullPath(f.abs(path_1.join(srcDir, file))), f.fullPath(f.abs(path_1.join(destDir, file))))));
{
"name": "@filemonger/main",
"version": "0.4.1",
"version": "0.4.2",
"description": "Process files with streams",

@@ -5,0 +5,0 @@ "main": "dist/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