Initial commit - full huishou project

This commit is contained in:
jiapengyu
2026-07-27 14:07:26 +08:00
commit 60790ad1b3
39127 changed files with 5989265 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
"use strict";
var util = require("util");
var NodeGit = require("../");
var Obj = NodeGit.Object;
/**
* Is this object a blob?
* @return {Boolean}
*/
Obj.prototype.isBlob = function () {
return this.type() == Obj.TYPE.BLOB;
};
/**
* Is this object a commit?
* @return {Boolean}
*/
Obj.prototype.isCommit = function () {
return this.type() == Obj.TYPE.COMMIT;
};
/**
* Is this object a tag?
* @return {Boolean}
*/
Obj.prototype.isTag = function () {
return this.type() == Obj.TYPE.TAG;
};
/**
* Is this object a tree?
* @return {Boolean}
*/
Obj.prototype.isTree = function () {
return this.type() == Obj.TYPE.TREE;
};
// Deprecated -----------------------------------------------------------------
Object.defineProperty(Obj.TYPE, "BAD", {
get: util.deprecate(function () {
return Obj.TYPE.INVALID;
}, "Use NodeGit.Object.TYPE.INVALID instead of NodeGit.Object.TYPE.BAD.")
});