Skip to content

Commit

Permalink
refactor(flags): refactor string type
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Mar 22, 2020
1 parent 10997f6 commit 6900462
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/flags/lib/types/string.ts
Expand Up @@ -2,7 +2,5 @@ import { IFlagArgument, IFlagOptions, ITypeHandler } from '../types.ts';

export const string: ITypeHandler<string> = ( option: IFlagOptions, arg: IFlagArgument, value: string | false ): string | undefined => {

if ( typeof value === 'string' && value.length ) {
return value;
}
return value || undefined;
};

0 comments on commit 6900462

Please sign in to comment.