New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ember-async-let

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-async-let

Alias the result of an async call to a new name

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

ember-async-let

Alias the result of an async call to a new name

Installation

ember install ember-async-let

Usage

{{async-let}}

A tagless component that prevents a block from rendering until the passed-in promise resolves

Async property

{{#async-let on=(async-property property) as |resolvedData|}}
  <div>{{resolvedData}}</div>
{{/async-let}}

Async function

const context = {
  methodName(param1, param2) {
    return Promise.resolve('foobar');
  }
};
{{#async-let on=(async-function context 'methodName' param1AsVariable 'param2-as-string') as |resolvedData|}}
  <div>{{resolvedData}}</div>
{{/async-let}}

Component placeholder

This will show a specified component as a placeholder until the async call resolves

{{#async-let on=(async-property property) placeholder=(component 'my-spinner') as |resolvedData|}}
  <div>{{resolvedData}}</div>
{{/async-let}}

Contributing

Installation

  • git clone <repository-url>
  • cd ember-async-let
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

  • ember serve
  • Visit the dummy application at http://localhost:4200.

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

Keywords

ember-addon

FAQs

Package last updated on 05 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts