Skip to content

Instantly share code, notes, and snippets.

View SandeepVattapparambil's full-sized avatar
🏠
Working from home

Sandeep Vattapparambil SandeepVattapparambil

🏠
Working from home
View GitHub Profile
@SandeepVattapparambil
SandeepVattapparambil / promise1.js
Created November 25, 2020 18:17 — forked from vkarpov15/promise1.js
Write Your Own Node.js Promise Library from Scratch, Part 1
class MyPromise {
constructor(executor) {
if (typeof executor !== 'function') {
throw new Error('Executor must be a function');
}
// Internal state. `$state` is the state of the promise, and `$chained` is
// an array of the functions we need to call once this promise is settled.
this.$state = 'PENDING';
this.$chained = [];
// Create "backend" object to hold data for getters and setters on main object
const _ = Object.create( null );
Object.defineProperties(
_,
{
firstname: {
value: 'John',
writable: true,
enumerable: false,
service: thumbnailer-service # NOTE: update this with your service name
plugins:
- serverless-offline
- serverless-plugin-existing-s3
provider:
name: aws
stage: dev
region: us-east-1
profile: default
runtime: nodejs6.10
{
"name": "thumbnailer",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Sandeep Vattapparambil",
"license": "ISC",
@SandeepVattapparambil
SandeepVattapparambil / CLA.md
Created June 28, 2018 16:37
Contributor License Agreement

JS Foundation Individual Contributor License Agreement v4.1 Thank you for your interest in the JS Foundation. This document clarifies the terms under which you, the person listed below, may make Contributions — which may include without limitation, software, bug fixes, configuration changes, documentation, or any other materials — to any of the projects owned or managed by the JS Foundation.

Please complete the following information about you and the Contributions. If you have questions about these terms, please contact us at legal@js.foundation.

You accept and agree to the following terms and conditions for your present and future Contributions submitted to the JS Foundation. Except for the license granted herein to the JS Foundation, you reserve all right, title, and interest in and to your Contributions.

Licenses JS Foundation projects, including code contributions and all related materials, are each released under the terms of the individual licenses as noted in the project's repository, or, if no sepa