UNPKG

914 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const hooks_1 = require("./hooks");
4function isHusky(data) {
5 // Husky v0.14 and prior used #husky as an identifier.
6 // Just in case some previous hooks weren't correctly uninstalled,
7 // and for a better transition this will allow v0.15+ to uninstall them as well.
8 const previousHuskyIdentifier = '#husky';
9 return (data.indexOf(hooks_1.huskyIdentifier) !== -1 ||
10 data.indexOf(previousHuskyIdentifier) !== -1);
11}
12exports.isHusky = isHusky;
13function isYorkie(data) {
14 return data.indexOf('#yorkie') !== -1;
15}
16exports.isYorkie = isYorkie;
17function isGhooks(data) {
18 return data.indexOf('// Generated by ghooks. Do not edit this file.') !== -1;
19}
20exports.isGhooks = isGhooks;
21function isPreCommit(data) {
22 return data.indexOf('./node_modules/pre-commit/hook') !== -1;
23}
24exports.isPreCommit = isPreCommit;