nl_tokens: Checks if a json file contains valid JSON string
pl_tokens: function valid ( ) { var fName = '' if ( arguments . length == 2 ) { // Given the database name and location const dbName = arguments [ 0 ] const dbLocation = arguments [ 1 ] var fName = path . join ( dbLocation , dbName + '.json' ) } else if ( arguments . length == 1 ) { const dbName = arguments [ 0 ] fname = path . join ( userData , dbName + '.json' ) } const content = fs . readFileSync ( fName , 'utf-8' ) <mask> { JSON . parse ( content ) } catch ( e ) { return false } return true }