How to use the @shabados/database.Sources.query function in @shabados/database

To help you get started, we’ve selected a few @shabados/database 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 ShabadOS / desktop / app / lib / db.js View on Github external
export const getSources = () => Sources
  .query()
  .eager( 'translationSources' )
  .then( sources => sources.reduce( (
    ( acc, { translationSources, id, ...source } ) => ( {
      ...acc,
      [ id ]: {
        ...source,
        translationSources: groupBy(
          translationSources,
          ( { languageId } ) => languageId,
        ),
      },
    } ) ), {} ) )
  .then( sources => ( {
    sources,
    recommended: Object.entries( sources ).reduce( (

@shabados/database

The open gurbani database containing an evolving set of corrections. Used in Shabad OS software.

GPL-3.0
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis