nl_tokens: check for use / omit in objs
pl_tokens: function ( data , key = false ) { const useIsFalse = function ( obj ) { return _ . includes ( [ false , 'false' ] , obj ) ; } ; const useIsTrue = function ( obj ) { return _ . includes ( [ <mask> , 'true' ] , obj ) ; } ; //init data check if ( ! key ) { const use = _ . get ( data , 'use' ) ; if ( useIsFalse ( use ) ) { return false ; } else if ( useIsTrue ( use ) ) { //remove use from data return _ . omit ( data , 'use' ) ; } } //cycle check if ( useIsFalse ( _ . get ( data , 'use' ) ) ) { return false ; } else if ( useIsTrue ( _ . get ( data , 'use' ) ) ) { data = _ . omit ( data , 'use' ) ; } //recurse check these, since there may be deeper options like tl to remove const searchObject = function ( sourceObj ) { //processing object - loop de loop for ( const property in sourceObj ) { if ( sourceObj . hasOwnProperty ( property ) ) { if ( _ . isPlainObject ( sourceObj [ property ] ) ) { const use = _ . get ( sourceObj [ property ] , 'use' ) ; if ( useIsFalse ( use ) ) { sourceObj = _ . omit ( sourceObj , property ) ; } else { if ( useIsTrue ( use ) ) { //removes ture ueses sourceObj [ property ] = _ . omit ( sourceObj [ property ] , 'use' ) ; } sourceObj [ property ] = searchObject ( sourceObj [ property ] ) ; } } } } return sourceObj ; } ; data = searchObject ( data ) ; return data ; }