Skip to content

Commit 66636bd

Browse files
hellaisevilaliv3
authored andcommitted
Re-add missing getExtension function
1 parent 7b3b32a commit 66636bd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/flow.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,14 @@
10301030
return this.file.type && this.file.type.split('/')[1];
10311031
},
10321032

1033+
/**
1034+
* Get file extension
1035+
* @function
1036+
* @returns {string}
1037+
*/
1038+
getExtension: function () {
1039+
return this.name.substr((~-this.name.lastIndexOf(".") >>> 0) + 2).toLowerCase();
1040+
}
10331041
};
10341042

10351043
/**

0 commit comments

Comments
 (0)