path-union
v2.0.5
Published
Create a union between two paths
Downloads
2
Readme
path-union
Create a union between two paths
Install
npm install path-union
Usage
Given two paths create a new union path.
import {union} from 'path-union'
const src = '/Users/davidchase/Desktop/github/path-union/fixtures/packages'
const dest = '/Users/davidchase/Desktop/github/path-union/dist'
union(dest, src) // => '/Users/davidchase/Desktop/github/path-union/dist/fixtures/packages'
also as a bonus you can do functional composition right to left 🔥
import {union, compose} from 'path-union'
import {dirname} from 'path'
const src = '/Users/davidchase/Desktop/github/path-union/fixtures/packages'
const dest = '/Users/davidchase/Desktop/github/path-union/dist'
compose(dirname, union)(dest, src) // => '/Users/davidchase/Desktop/github/path-union/dist/fixtures'
API
union :: String => String => String
Todo
- [x] add rollup + buble