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

netceteragroup / girders-elements / 259 / 1
83%
master: 83%

Build:
DEFAULT BRANCH: master
Ran 02 Jan 2018 09:58AM UTC
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

02 Jan 2018 09:56AM UTC coverage: 83.508% (+0.4%) from 83.08%
259.1

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

Source Files on job 259.1
  • Tree
  • List 0
  • Changed 32
  • Source Changed 4
  • Coverage Changed 32
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 259
  • Travis Job 259.1
  • 2a470953 on github
  • Prev Job for on master (#255.1)
  • Next Job for on master (#260.1)
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