repository-provider
Advanced tools
Comparing version 5.2.1 to 5.2.2
@@ -361,5 +361,15 @@ 'use strict'; | ||
} | ||
get isBlob() { | ||
get isFile() { | ||
return this.type === Content.TYPE_BLOB; | ||
} | ||
toString() { | ||
return this.path; | ||
} | ||
toJSON() { | ||
return { | ||
path: this.path, | ||
type: this.type, | ||
mode: this.mode | ||
}; | ||
} | ||
equals(other) { | ||
@@ -374,2 +384,7 @@ if (other === undefined || this.path !== other.path || this.type !== other.type || this.mode !== other.mode) { | ||
} else { | ||
if (typeof this.content === "string" || this.content instanceof String) { | ||
if (typeof other.content === "string" || other.content instanceof String) { | ||
return this.content === other.content; | ||
} | ||
} | ||
if (this.content === undefined && other.content === undefined) { | ||
@@ -376,0 +391,0 @@ return true; |
{ | ||
"name": "repository-provider", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -103,3 +103,3 @@ [![npm](https://img.shields.io/npm/v/repository-provider.svg)](https://www.npmjs.com/package/repository-provider) | ||
- [isDirectory](#isdirectory) | ||
- [isBlob](#isblob) | ||
- [isFile](#isfile) | ||
- [equals](#equals) | ||
@@ -433,5 +433,5 @@ - [Parameters](#parameters-12) | ||
### isBlob | ||
### isFile | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true is content represents a blog (plain old file) | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true is content represents a blob (plain old file) | ||
@@ -438,0 +438,0 @@ ### equals |
@@ -50,8 +50,20 @@ /** | ||
/** | ||
* @return {boolean} true is content represents a blog (plain old file) | ||
* @return {boolean} true is content represents a blob (plain old file) | ||
*/ | ||
get isBlob() { | ||
get isFile() { | ||
return this.type === Content.TYPE_BLOB; | ||
} | ||
toString() { | ||
return this.path; | ||
} | ||
toJSON() { | ||
return { | ||
path: this.path, | ||
type: this.type, | ||
mode: this.mode | ||
}; | ||
} | ||
/** | ||
@@ -77,2 +89,11 @@ * compare against other content | ||
} else { | ||
if (typeof this.content === "string" || this.content instanceof String) { | ||
if ( | ||
typeof other.content === "string" || | ||
other.content instanceof String | ||
) { | ||
return this.content === other.content; | ||
} | ||
} | ||
if (this.content === undefined && other.content === undefined) { | ||
@@ -79,0 +100,0 @@ return true; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61870
1578