Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-promise

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-promise

A simple promise object that will wrap xhr resolve/reject with an ember.run

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by900%
Maintainers
2
Weekly downloads
 
Created
Source

Ember-promise

Build Status

Description

A simple promise object that will wrap xhr resolve/reject with an ember.run

Installation

# install via npm
$ npm install ember-promise --save-dev

Basic Usage

import Ember from 'ember';
import PromiseMixin from 'ember-promise/mixins/promise';

var PeopleRoute = Ember.Route.extend({
    model: function() {
        var people = [];
        PromiseMixin.xhr("/api/people", "GET").then(function(response) {
            response.forEach(function(person) {
                people.pushObject(Ember.Object.create(person));
            });
        });
        return people;
    }
});

export default PeopleRoute;

Running the unit tests

npm install
ember test

Example project

https://github.com/toranb/ember-cli-store-example

License

Copyright © 2015 Toran Billups http://toranbillups.com

Licensed under the MIT License

Keywords

FAQs

Package last updated on 04 May 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc