Skip to content

Instantly share code, notes, and snippets.

View steinathan's full-sized avatar
🌍
Hire me

Nathan (navi) steinathan

🌍
Hire me
View GitHub Profile
@steinathan
steinathan / sails-as-service.md
Last active October 24, 2019 08:10
Run your backend code without managing servers, Create actions that are triggered by HTTP events - Proposal

Action as Service (AAS)

After looking at Cloud Functions

"Run your mobile backend code without managing servers, Create functions that are triggered by Firebase products, such as changes to data in the Realtime Database, new user sign-ups via Auth, and conversion events in Analytics."

This is a very good concept, machine actions solve this already but we are looking for a way on making it containerized and visualized.

The Idea

// Deep-merges arrays without duplicate values
const mergeCustomizer = (objValue: any, srcValue: any) => {
if (Array.isArray(objValue) && Array.isArray(srcValue)) {
return uniqWith(
[...srcValue, ...objValue],
(a, b) => a === b || isEqual(a, b),
);
}
};