import { newPostIsValid } from './newPostIsValid' ; export function existingPostIsValid ( uploadsInProgress , title , oldTitle , content , oldContent , channel ? , oldChannel ? , tags ? , oldTags ? ) { const titleIsValid = title !== oldTitle ; const contentIsValid = content !== oldContent ; const channelIsValid = channel !== oldChannel ; const tagsIsValid = JSON . stringify ( tags ) !== JSON . stringify ( oldTags ) ; const postIsValid = ( titleIsValid || contentIsValid || channelIsValid || tagsIsValid ) && newPostIsValid ( title , content , uploadsInProgress ) ; return postIsValid ; }