Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

22 Zeilen
439B

  1. 'use strict';
  2. const path = require('path');
  3. module.exports = (childPath, parentPath) => {
  4. childPath = path.resolve(childPath);
  5. parentPath = path.resolve(parentPath);
  6. if (process.platform === 'win32') {
  7. childPath = childPath.toLowerCase();
  8. parentPath = parentPath.toLowerCase();
  9. }
  10. if (childPath === parentPath) {
  11. return false;
  12. }
  13. childPath += path.sep;
  14. parentPath += path.sep;
  15. return childPath.startsWith(parentPath);
  16. };