File size: 208 Bytes
1e92f2d
 
 
 
 
 
1
2
3
4
5
6
7
import compact from '../utils/compact';
import get from '../utils/get';
import unset from '../utils/unset';

export default <T>(ref: T, name: string) =>
  !compact(get(ref, name)).length && unset(ref, name);