This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/husky/lib/installer/is.js
2020-11-01 22:46:04 +00:00

25 lines
914 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hooks_1 = require("./hooks");
function isHusky(data) {
// Husky v0.14 and prior used #husky as an identifier.
// Just in case some previous hooks weren't correctly uninstalled,
// and for a better transition this will allow v0.15+ to uninstall them as well.
const previousHuskyIdentifier = '#husky';
return (data.indexOf(hooks_1.huskyIdentifier) !== -1 ||
data.indexOf(previousHuskyIdentifier) !== -1);
}
exports.isHusky = isHusky;
function isYorkie(data) {
return data.indexOf('#yorkie') !== -1;
}
exports.isYorkie = isYorkie;
function isGhooks(data) {
return data.indexOf('// Generated by ghooks. Do not edit this file.') !== -1;
}
exports.isGhooks = isGhooks;
function isPreCommit(data) {
return data.indexOf('./node_modules/pre-commit/hook') !== -1;
}
exports.isPreCommit = isPreCommit;