simple-fake-path

Mockable fake path module

Usage no npm install needed!

<script type="module">
  import simpleFakePath from 'https://cdn.skypack.dev/simple-fake-path';
</script>

README

Simple Fake Path

Mockable fake path module

Usages

// Example in TypeScript

import { FakePath, symCwd, symRoot } from 'simple-fake-path' // FakePath is an abstract class
class Path extends FakePath {
  public readonly [symCwd] = '/working/directory'
  public readonly [symRoot] = ['/']
  public readonly sep = '/'
}
const path = new Path() // you can access to some path methods from here

License

MIT © Hoàng Văn Khải