Sha256: 51da5477e93527de3d4f72ba6985114bb21a702616628938f308026a6feedaf0

Contents?: true

Size: 274 Bytes

Versions: 53

Compression:

Stored size: 274 Bytes

Contents

function wasSuccessful(event) {
  return getEventDetail(event).success;
}

function hasFailed(event) {
  return !getEventDetail(event).success;
}

function getEventDetail(obj) {
  return obj instanceof CustomEvent ? obj.detail : obj;
}

export { wasSuccessful, hasFailed };

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
coveragebook_components-0.16.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.15.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.14.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.13.1 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.13.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.12.2 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.12.1 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.12.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.11.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.10.1.beta.2 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.10.1.beta.1 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.10.1.beta.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.10.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.9.1 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.9.0 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.8.9 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.8.8 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.8.7 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.8.6 app/assets/js/helpers/turbo_events.js
coveragebook_components-0.8.5 app/assets/js/helpers/turbo_events.js