Skip to content
@hybridables

JavaScript Hybrids

#asyncfirst #alwaysasync #hybridify. All hybrids and related things.

Pinned repositories

  1. Hybridify@2. Create sync or async function to support both promise and callback-style APIs in same time. Using the power of `relike`.

    JavaScript 7

  2. 🏆 Handle completion and errors with elegance! Support for async/await, promises, callbacks, streams and observables. A drop-in replacement for async-done - pass 100% of its tests plus more

    JavaScript 30 1

  3. try/catch block with a callback, used in `try-catch-core`. Use it when you don't care about asyncness so much and don't want guarantees. If you care use `try-catch-core`.

    JavaScript 4

  4. Transform any value to stream. Create stream from any value - string, array, buffer, number, promise or even Error object.

    JavaScript 3

  5. Transform sync, async or generator function to Stream. Correctly handle errors and optional arguments.

    JavaScript 3

  6. Transform ES2015 Promise to Stream - specifically, Transform Stream using `through2`. Works in object mode by default, but you can pass options directly to the `through2` package.

    JavaScript 3

  • try-catch-core

    Asynchronous and sync tryCatch in one place - works almost like `async-done`, used in `always-done`. The callback is securely wrapped with a `dezalgo` and `once`.

    JavaScript MIT 1 9 0 6 Updated Nov 7, 2019
  • try-catch-callback

    try/catch block with a callback, used in `try-catch-core`. Use it when you don't care about asyncness so much and don't want guarantees. If you care use `try-catch-core`.

    JavaScript MIT 0 4 0 6 Updated Nov 6, 2019
  • always-done

    🏆 Handle completion and errors with elegance! Support for async/await, promises, callbacks, streams and observables. A drop-in replacement for async-done - pass 100% of its tests plus more

    JavaScript MIT 1 30 3 5 Updated Nov 6, 2019
  • always-promise

    Promisify, basically, everything. Generator function, callback-style or synchronous function; sync function that returns child process, stream or observable; directly passed promise, stream or child process.

    JavaScript MIT 1 3 1 0 Updated Jul 24, 2017
  • letta

    #asyncfirst 🐈 Promisify sync, async or generator function, using relike. Kind of promisify, but lower level. Full compatibility with co4 and passing 100% of its tests.

    JavaScript MIT 0 4 3 0 Updated Jul 24, 2017
  • hybridify

    Hybridify@2. Create sync or async function to support both promise and callback-style APIs in same time. Using the power of `relike`.

    JavaScript MIT 0 7 2 0 Updated Jul 12, 2017
  • relike-all

    Promisify all functions in an object, using `relike`.

    JavaScript MIT 0 2 0 0 Updated Jun 21, 2017
  • handle-errors

    Handling/creating hybrid errors, if callback pass to it else throw

    JavaScript MIT 0 1 0 0 Updated May 24, 2017
  • redolent

    Simple promisify with sane defaults, works on node 0.10 if you provide custom Promise through options

    JavaScript MIT 0 3 0 0 Updated May 5, 2017
  • then-callback

    Wrap a promise to allow passing callback to `.then` of given promise, also works as normal `.then`

    JavaScript MIT 0 1 0 0 Updated Apr 5, 2017
  • always-stream

    Create stream from any value - function, array, string, buffer, promise, number, object and etc. Always returns a function that returns Transform Stream, using through2.

    JavaScript MIT 0 3 2 0 Updated Mar 17, 2017
  • callback2stream

    Transform sync, async or generator function to Stream. Correctly handle errors and optional arguments.

    JavaScript MIT 0 3 3 0 Updated Mar 17, 2017
  • create-callback

    Create callback api from synchronous function. Same as `make-callback`, but won't handle generators and if async function is given returns it.

    JavaScript MIT 0 1 0 0 Updated Mar 11, 2017
  • promise2stream

    Transform ES2015 Promise to Stream - specifically, Transform Stream using `through2`. Works in object mode by default, but you can pass options directly to the `through2` package.

    JavaScript MIT 0 3 0 0 Updated Mar 11, 2017
  • promise2thunk

    Convert (transform) promise to thunk, just like was in co@3

    JavaScript MIT 0 2 3 0 Updated Mar 3, 2017
  • coone

    Acts like `co@3` and also is drop-in replacement for it. Built on top of `merz`, actually thanks to `always-done`. But accept everything, not only generators - sync functions, async functions, callbacks and more. Flow-control for now and then.

    JavaScript MIT 0 1 2 0 Updated Jan 16, 2017
  • make-callback

    Make synchronous function or generator to support callback api

    JavaScript MIT 0 4 0 0 Updated Jan 16, 2017
  • letta-value

    Extends `letta` to accept and handles more than functions only. Handles all kind of results from `letta`/promise. Basically, creating promise from everything - strings, arrays, objects, functions, generators, generator functions, promises, streams, child processes, observables, maps, symbols, dates and etc.

    JavaScript MIT 0 1 1 0 Updated Jan 16, 2017
  • is-hybrid

    Check whether an object looks like Hybrid which is promises-a+ promise and callback api

    JavaScript MIT 0 1 0 0 Updated Jan 16, 2017
  • handle-callback

    Make promise to have support for callback API, it returns promise in that same time.

    JavaScript MIT 0 3 0 0 Updated Jan 16, 2017
  • then-got

    Promisified `simple-get`.

    JavaScript MIT 0 1 0 0 Updated Jan 16, 2017
  • relike

    #asyncfirst ⭐️ Simple promisify async or sync function with sane defaults. Lower level than `promisify` thing.

    JavaScript MIT 0 2 2 0 Updated Dec 22, 2016
  • relike-value

    Create promise from sync, async, string, number, array and so on. Handle completion (results) and errors gracefully! Built on top of `relike`, used by `redolent` to build robust (hybrid) APIs.

    JavaScript MIT 0 2 0 0 Updated Dec 22, 2016
  • merz

    Wrapper to handle completion and errors of sync and async functions, promises, generators, streams, observables and child processes.

    JavaScript MIT 0 2 1 0 Updated Nov 9, 2016
  • handle-observable

    Handle completion of an observable, using observable's `.subscribe` method.

    JavaScript 0 1 0 0 Updated Nov 1, 2016
  • handle-stream

    Handle completion of a stream, using `on-stream-end` and `stream-exhaust`.

    JavaScript 0 1 0 0 Updated Nov 1, 2016
  • value2stream

    Transform any value to stream. Create stream from any value - string, array, buffer, number, promise or even Error object.

    JavaScript MIT 0 3 1 0 Updated Nov 1, 2016
  • exec-cmd

    Flexible and cross-platform executing commands. Hybrid, Async and Promise API.

    JavaScript MIT 0 2 1 0 Updated Nov 1, 2016
  • hybridify-all

    Hybridifies all the selected functions in an object.

    JavaScript MIT 0 2 1 0 Updated Nov 1, 2016
  • handle-arguments

    Get separately non-callback arguments in `.arguments` and the last argument if it `is-callback-function` in `.callback` property. It also works like `sliced`, but returns object with `.arguments` and `.callback` properties.

    JavaScript MIT 0 3 0 0 Updated Nov 1, 2016
You can’t perform that action at this time.