Skip to content

Instantly share code, notes, and snippets.

View thidasapankaja's full-sized avatar

Thidasa Pankaja Paranavitharana thidasapankaja

View GitHub Profile
@michaelmcshinsky
michaelmcshinsky / api-core.js
Last active December 8, 2023 13:51
A comprehensive starter solution to making API calls structured and manageable in code architecture and development teams.
import apiProvider from './provider';
export class ApiCore {
constructor(options) {
if (options.getAll) {
this.getAll = () => {
return apiProvider.getAll(options.url);
};
}
@apal21
apal21 / ES5 class.js
Last active March 7, 2023 08:06
Example for blog to show the difference between ES5 and ES6 javascript classes using inheritance and prototypes use cases.
'use strict';
/**
* Person class.
*
* @constructor
* @param {String} name - name of a person.
* @param {Number} age - age of a person.
* @param {String} gender - gender of a person.
*/