UNPKG

react-router-ga

Version:

[![Downloads](https://img.shields.io/npm/dm/react-router-ga)](https://npm.im/react-router-ga) [![Version](https://img.shields.io/npm/v/react-router-ga)](https://npm.im/react-router-ga) [![License](https://img.shields.io/npm/l/react-router-ga)](https://ope

15 lines (11 loc) 319 B
'use strict'; const path = require('path'); const pathIsInside = require('path-is-inside'); module.exports = (childPath, parentPath) => { childPath = path.resolve(childPath); parentPath = path.resolve(parentPath); if (childPath === parentPath) { return false; } return pathIsInside(childPath, parentPath); };