• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

netceteragroup / girders-elements / 259
83%

Build:
DEFAULT BRANCH: master
Ran 02 Jan 2018 09:58AM UTC
Jobs 1
Files 68
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
259

push

travis-ci

web-flow
Enhancers (an alternative to Enrichers) (#87)

Implement *enhancers* as an alternative to *enrichers*.

Profiling showed that there is a significant performance impact of using enrichers mostly due to the inefficient Promise implementation present in react native. Enhancers are a solution (probably a temporary one) that should perform better.

Enhancers, like enrichers are registered for a specific element, but they will be only allowed to act on root level elements.

Enhancers have the API
```javascript
// registration
enhance.register(kind, enhancer)

// enhancer signature
enhancer :: async (el, context) => (el => el)
```

In other words, they take the element, an optional context and then return an updating fn that will eventually apply the enhancement to the element in question.

All enhancers are run in parallel on the read document. The order in which the returned update fns are run is determined by the subsystem sequence / registration sequence.

The idea is that the enhancer performs necessary async / fetch operations in the body of the async call (by examining the provided document), once everything is ready it returns the update fn which will apply the changes on the document.

e.g.

```javascript
enhance.register(['document'], async (el, context) => {
  const bookmarks = await getBookmarks(context)

  return document => applyBookmarks(document)
})
```

Closes #84

311 of 469 branches covered (66.31%)

795 of 952 relevant lines covered (83.51%)

46.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 259.1 02 Jan 2018 09:58AM UTC 0
83.51
Travis Job 259.1
Source Files on build 259
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #259
  • 2a470953 on github
  • Prev Build on master (#255)
  • Next Build on master (#260)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc