File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -102,17 +102,6 @@ function _randomChars(howMany: number) {
102102 return value . join ( '' ) ;
103103}
104104
105- /**
106- * Checks whether the `obj` parameter is defined or not.
107- *
108- * @param {Object } obj
109- * @returns {boolean } true if the object is undefined
110- * @private
111- */
112- function _isUndefined ( obj : any ) {
113- return typeof obj === 'undefined' ;
114- }
115-
116105/**
117106 * Generates a new temporary name.
118107 *
@@ -237,7 +226,7 @@ function file(callbackOrOptions: FileOptions | FileCallback, callback?: FileCall
237226 cb = callback || emptyCallback ;
238227 }
239228
240- opts . postfix = ( _isUndefined ( opts . postfix ) ) ? '.tmp' : opts . postfix ;
229+ opts . postfix = ( typeof opts . postfix == 'undefined' ) ? '.tmp' : opts . postfix ;
241230
242231 // gets a temporary filename
243232 tmpName ( opts , function _tmpNameCreated ( err , name ) {
@@ -380,7 +369,7 @@ function dir(callbackOrOptions: DirOptions | DirCallback, callback?: DirCallback
380369 * @throws {Error } if it cannot create a directory
381370 */
382371function dirSync ( options : DirOptions ) {
383- const opts : DirOptions = typeof options == 'undefined' ? { } : options ;
372+ const opts : DirOptions = ( typeof options == 'undefined' ) ? { } : options ;
384373
385374 const name = tmpNameSync ( opts ) ;
386375 fs . mkdirSync ( name , opts . mode || DIR_MODE ) ;
You can’t perform that action at this time.
0 commit comments