githuburl
Version:
Parse a github repo url into an object of repo information and convert to several types of clone URL.
29 lines (21 loc) • 389 B
JavaScript
;
function a (argument) {
// code...
}
Object.defineProperty(a.prototype, '_a', {
writable: true,
enumerable: false
})
Object.defineProperty(a.prototype, 'a', {
get: function () {
if (!this._a) {
console.log('getter');
this._a = 'a';
}
return this._a
}
// writable: true
})
var _ = new a();
console.log(_.a);
console.log(_.a, _);