Skip to content

Commit f8660f4

Browse files
committed
flipped the naming
1 parent 9a66b2d commit f8660f4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

from.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ const {stat} = fs;
88
* @param {string} path filepath on the disk
99
* @returns {Blob}
1010
*/
11-
const blobFrom = path => from(statSync(path), path);
11+
const blobFromSync = path => from(statSync(path), path);
1212

1313
/**
1414
* @param {string} path filepath on the disk
1515
* @returns {Promise<Blob>}
1616
*/
17-
const blobFromAsync = path => stat(path).then(stat => from(stat, path));
17+
const blobFrom = path => stat(path).then(stat => from(stat, path));
1818

1919
const from = (stat, path) => new Blob([new BlobDataItem({
2020
path,
@@ -47,10 +47,10 @@ class BlobDataItem {
4747
*/
4848
slice(start, end) {
4949
return new BlobDataItem({
50-
path: this.path,
51-
start,
52-
mtime: this.mtime,
53-
size: end - start
50+
path: this.#path,
51+
lastModified: this.lastModified,
52+
size: end - start,
53+
start
5454
});
5555
}
5656

@@ -72,5 +72,5 @@ class BlobDataItem {
7272
}
7373
}
7474

75-
export default blobFrom;
76-
export {Blob, blobFrom, blobFromAsync};
75+
export default blobFromSync;
76+
export {Blob, blobFrom, blobFromSync};

0 commit comments

Comments
 (0)