/
eapostnova
/
2026-1--study--simulation-modeling
Обзор
Документация
Войти
/
eapostnova
/
2026-1--study--simulation-modeling
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
3
CI/CD
Аналитика
Безопасность
develop
node_modules/dotgitignore/index.js
21 строка
532 B
Елизавета Постнова
chore(site): add changelog
06 мар 2026, 00:34
Верифицирован
06 мар 2026, 00:34
8cca814
Код
Авторство
О чём код?
'use strict' const findUp = require('find-up') const fs = require('fs') const ignore = require('./lib/dotignore') const gitignoreFilename = '.gitignore' class DotGitignore { constructor (opts) { const gitignorePath = findUp.sync(gitignoreFilename, opts) const content = gitignorePath ? fs.readFileSync(gitignorePath, 'utf8') : '' this.matcher = ignore.createMatcher(content) } ignore (name) { return this.matcher.shouldIgnore(name) } } module.exports = function (opts) { return new DotGitignore(opts) }