All Projects → jamiebuilds → Tickedoff

jamiebuilds / Tickedoff

Licence: mit
Tiny library (<200B gzip) for deferring something by a "tick"

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tickedoff

Promise Fun
Promise packages, patterns, chat, and tutorials
Stars: ✭ 3,779 (+1674.18%)
Mutual labels:  async, promise, polyfill, ponyfill
Core Js
Standard Library
Stars: ✭ 15,854 (+7343.19%)
Mutual labels:  promise, polyfill, ponyfill
Kitchen Async
A Promise library for ClojureScript, or a poor man's core.async
Stars: ✭ 128 (-39.91%)
Mutual labels:  async, promise
Rubico
[a]synchronous functional programming
Stars: ✭ 133 (-37.56%)
Mutual labels:  async, promise
Unityfx.async
Asynchronous operations (promises) for Unity3d.
Stars: ✭ 143 (-32.86%)
Mutual labels:  async, promise
Bach
Compose your async functions with elegance.
Stars: ✭ 117 (-45.07%)
Mutual labels:  async, promise
Ts Polyfill
Runtime polyfills for TypeScript libs, powered by core-js! 🔋 🔩
Stars: ✭ 122 (-42.72%)
Mutual labels:  promise, polyfill
Functional Promises
Write code like a story w/ a powerful Fluent (function chaining) API
Stars: ✭ 141 (-33.8%)
Mutual labels:  async, promise
Es6 Promise Polyfill
ES6 Promise polyfill
Stars: ✭ 99 (-53.52%)
Mutual labels:  promise, polyfill
Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (-23%)
Mutual labels:  async, promise
Async Busboy
Promise based multipart form parser for KoaJS
Stars: ✭ 159 (-25.35%)
Mutual labels:  async, promise
Kitsu
🦊 A simple, lightweight & framework agnostic JSON:API client
Stars: ✭ 166 (-22.07%)
Mutual labels:  async, promise
Jdeferred
Java Deferred/Promise library similar to JQuery.
Stars: ✭ 1,483 (+596.24%)
Mutual labels:  async, promise
Tedis
redis client with typescript and esnext for nodejs
Stars: ✭ 109 (-48.83%)
Mutual labels:  async, promise
Tas
Make it easy to develop large, complex Node.js app.
Stars: ✭ 128 (-39.91%)
Mutual labels:  async, promise
Resize Observer Polyfill
A polyfill for the Resize Observer API
Stars: ✭ 1,530 (+618.31%)
Mutual labels:  polyfill, ponyfill
Sieppari
Small, fast, and complete interceptor library for Clojure/Script
Stars: ✭ 133 (-37.56%)
Mutual labels:  async, promise
Ppipe
pipes values through functions, an alternative to using the proposed pipe operator ( |> ) for ES
Stars: ✭ 192 (-9.86%)
Mutual labels:  async, promise
Datakernel
Alternative Java platform, built from the ground up - with its own async I/O core and DI. Ultra high-performance, simple and minimalistic - redefines server-side programming, web-development and highload!
Stars: ✭ 87 (-59.15%)
Mutual labels:  async, promise
Taskorama
⚙ A Task/Future data type for JavaScript
Stars: ✭ 90 (-57.75%)
Mutual labels:  async, promise

tickedoff

Tiny library (<200B gzip) for deferring something by a "tick"

  • Using setTimeout is actually a bit slow because its clamped to 4ms
  • setImmediate is not available in most places (and probably never will be)
  • process.nextTick is only in Node
  • Promise#then needs polyfills in places
  • tickedoff uses whatever the best available option is
  • There are more robust libraries/polyfills but they are larger in size
  • This is all especially good for libraries to use

Install

yarn add tickedoff

Usage

const defer = require('tickedoff');

console.log(1);
defer(() => console.log(3));
console.log(2);
// 1
// 2
// 3

Perf

$ node perf.js
process.nextTick x 10000 = 24ms
Promise#then x 10000 = 29ms
setImmediate x 10000 = 68ms
setTimeout x 10000 = 13506ms
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].