How to use the ember-rfc176-data.map function in ember-rfc176-data

To help you get started, we’ve selected a few ember-rfc176-data 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 kyleshevlin / alfred-ember-module-lookup / index.js View on Github external
'use strict'
const alfy = require('alfy')
const mapping = require('ember-rfc176-data')

function isDefaultExport(localName) {
  return !!localName
}

const pairs = mapping.map(
  ({ global, module, export: exportName, localName, deprecated }) => {
    if (isDefaultExport(localName)) {
      return {
        key: localName,
        value: `import ${localName} from '${module}'`
      }
    }

    return {
      key: exportName,
      value: `import { ${exportName} } from '${module}'`
    }
  }
)

const matches = alfy.inputMatches(pairs, 'key')

ember-rfc176-data

JSON data for Ember.js RFC #176

MIT
Latest version published 1 year ago

Package Health Score

63 / 100
Full package analysis

Similar packages