Skip to content

Instantly share code, notes, and snippets.

View sarahbkim's full-sized avatar

sarahbkim sarahbkim

View GitHub Profile
@gvergnaud
gvergnaud / Promises-under-the-hood.md
Last active December 24, 2023 18:35
Promises, under the hood.

Promises, under the hood

You all know that to create a new Promise you need to define it this way:

  new Promise((resolve, reject) => {
    ...
    resolve(someValue)
  })

You are passing a callback that defines the specific behavior of your promise.

@egaumer
egaumer / app.js
Last active July 24, 2018 13:25
Getting Started with elasticsearch and AngularJS
/*jshint globalstrict:true */
/*global angular:true */
'use strict';
angular.module('demo', [
'demo.controllers',
'demo.directives',
'elasticjs.service'
]);