How to use the only function in only

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

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ElementsProject / nanopos / src / app.js View on Github external
: null

  if (!item) return res.sendStatus(404)

  const metadata = { source: 'nanopos', item: req.body.item }

  if (item.metadata) Object.assign(metadata, item.metadata)

  const inv = await charge.invoice({
    amount: item.price
  , currency: item.price ? app.settings.currency : null
  , description: `${ app.settings.title }${ item.title ? ': ' + item.title : '' }`
  , expiry: 599
  , metadata
  })
  res.send(only(inv, 'id payreq msatoshi quoted_currency quoted_amount expires_at'))
}))
github jenkinsci / working-hours-plugin / src / main / react / app / containers / App / excludedDate / index.js View on Github external
        .map(item => only(item, [
          "holiday",
          "holidayRegion",
          "name",
          "type",
          "startDate",
          "endDate",
          "noEnd",
          "repeat",
          "repeatCount",
          "repeatInterval",
          "repeatPeriod"].join(" ")))
    }).then(res => {
github jenkinsci / working-hours-plugin / src / main / react / app / containers / App / timeRange / index.js View on Github external
      data: param.map(item => only(item, "dayOfWeek endTime startTime"))
    }).then(res => {

only

return whitelisted properties of an object

MIT
Latest version published 11 years ago

Package Health Score

67 / 100
Full package analysis

Popular only functions