1.0.12 • Published 3 years ago

synopregize v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Synopregize

Sync On Predicate "Energize" 🖖

Purpose

Easily chain calls to different services depending on certain conditions. Do these operations in order or in parallel. Designed for ease of use with frontend applications.

WARNING: this library is not ready for production use and is still being worked on.

Sample

const synop = require('synopregize');
const { isGreaterThan } = synop.operations;
const operation = synop.create({
 name: 'example',
 url: 'http://yourapi.com/v1/endpoint',
 predicate: {
  key: 'key',
  target: isGreaterThan(9000),
  success: (data, next, train) => {
   console.log(`${data.key} is over 9000!`);
  },
  miss: (data, next, train) => {
   console.log(`${data.key} is below 9000, go ahead Nappa...`);
  },
 }
});

synop.add(operation);
synop.run();
1.0.11

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.10

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.2

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago