How to use the just-flush function in just-flush

To help you get started, we’ve selected a few just-flush examples, based on popular ways it is used in public projects.

github fanfoujs / space-fanfou / src / features / status-form-enhancements / ajax-form@page.js View on Github external
// 偶尔出现没有图片需要上传,但是部分字段需要调整的情况
    if (!isImageAttached && formDataJson.action === API_ACTION_UPLOAD_IMAGE) {
      formDataJson.action = API_ACTION_PLAIN_MESSAGE
      formDataJson.content = formDataJson.desc
    }

    if (isImageAttached) {
      delete formDataJson.content
    } else {
      delete formDataJson.desc
      delete formDataJson.photo_base64
      delete formDataJson.picture
    }

    formDataJson = flush(formDataJson)

    return { isImageAttached, formDataJson }
  }
github ritz078 / emoji-assistant / app / scripts.babel / getSuggestions.js View on Github external
.then(({results}) => {
          const smartEmojis = flush(results.map(({text}) => {
            return getEmojiDetailsFromEmoji(text)
          }))

          const suggestions = uniqBy(smartEmojis.concat(filtered), 'short_name')
          const presentSuggestions = suggestions.filter(x => !!getEmoji(x.short_name))
          cb(presentSuggestions)
        })
        .catch(error => {

just-flush

returns a copy of an array or object with null/undefined members removed

MIT
Latest version published 2 months ago

Package Health Score

84 / 100
Full package analysis

Popular just-flush functions

Similar packages