repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/compose.js | lib/compose.js | import seq from './seq.js'
/**
* Creates a function which is a composition of the passed asynchronous
* functions. Each function consumes the return value of the function that
* follows. Composing functions `f()`, `g()`, and `h()` would produce the result
* of `f(g(h()))`, only this version uses callbacks to obtai... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/unmemoize.js | lib/unmemoize.js | /**
* Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
* unmemoized form. Handy for testing.
*
* @name unmemoize
* @static
* @memberOf module:Utils
* @method
* @see [async.memoize]{@link module:Utils.memoize}
* @category Util
* @param {AsyncFunction} fn - the memoized fu... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/retryable.js | lib/retryable.js | import retry from './retry.js'
import initialParams from './internal/initialParams.js'
import {default as wrapAsync, isAsync} from './internal/wrapAsync.js'
import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js'
/**
* A close relative of [`retry`]{@link module:ControlFlow.retry}. This method... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/groupBySeries.js | lib/groupBySeries.js | import groupByLimit from './groupByLimit.js'
/**
* The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
*
* @name groupBySeries
* @static
* @memberOf module:Collections
* @method
* @see [async.groupBy]{@link module:Collections.groupBy}
* @category Collecti... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/times.js | lib/times.js | import timesLimit from './timesLimit.js'
/**
* Calls the `iteratee` function `n` times, and accumulates results in the same
* manner you would use with [map]{@link module:Collections.map}.
*
* @name times
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.map]{@link module:Collections.map}
* @ca... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/every.js | lib/every.js | import createTester from './internal/createTester.js'
import eachOf from './eachOf.js'
import awaitify from './internal/awaitify.js'
/**
* Returns `true` if every element in `coll` satisfies an async test. If any
* iteratee call returns `false`, the main `callback` is immediately called.
*
* @name every
* @static... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/applyEachSeries.js | lib/applyEachSeries.js | import applyEach from './internal/applyEach.js'
import mapSeries from './mapSeries.js'
/**
* The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
*
* @name applyEachSeries
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.applyEach]{@link... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/forever.js | lib/forever.js | import onlyOnce from './internal/onlyOnce.js'
import ensureAsync from './ensureAsync.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'
/**
* Calls the asynchronous function `fn` with a callback parameter that allows it
* to call itself again, in series, indefinitely.
... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/mapValuesSeries.js | lib/mapValuesSeries.js | import mapValuesLimit from './mapValuesLimit.js'
/**
* The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
*
* @name mapValuesSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.mapValues]{@link module:Collections.mapValues}
* @cat... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/priorityQueue.js | lib/priorityQueue.js | import queue from './queue.js'
import Heap from './internal/Heap.js'
/**
* The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
* completed in ascending priority order.
*
* @name priorityQueue
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.queue]{@l... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/dir.js | lib/dir.js | import consoleFunc from './internal/consoleFunc.js'
/**
* Logs the result of an [`async` function]{@link AsyncFunction} to the
* `console` using `console.dir` to display the properties of the resulting object.
* Only works in Node.js or in browsers that support `console.dir` and
* `console.error` (such as FF and C... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/each.js | lib/each.js | import eachOf from './eachOf.js'
import withoutIndex from './internal/withoutIndex.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'
/**
* Applies the function `iteratee` to each item in `coll`, in parallel.
* The `iteratee` is called with an item from the list, and a ... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/whilst.js | lib/whilst.js | import onlyOnce from './internal/onlyOnce.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'
/**
* Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
* stopped, or an error occurs.
*
* @name whilst
* @static
* @memberOf module:ControlFlow... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/mapSeries.js | lib/mapSeries.js | import _map from './internal/map.js'
import eachOfSeries from './eachOfSeries.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
*
* @name mapSeries
* @static
* @memberOf module:Collections
* @method
* @see ... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/cargoQueue.js | lib/cargoQueue.js | import queue from './internal/queue.js'
/**
* Creates a `cargoQueue` object with the specified payload. Tasks added to the
* cargoQueue will be processed together (up to the `payload` limit) in `concurrency` parallel workers.
* If the all `workers` are in progress, the task is queued until one becomes available. On... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/eachOfSeries.js | lib/eachOfSeries.js | import eachOfLimit from './eachOfLimit.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
*
* @name eachOfSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.eachOf]{@link module:Co... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/everySeries.js | lib/everySeries.js | import createTester from './internal/createTester.js'
import eachOfSeries from './eachOfSeries.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
*
* @name everySeries
* @static
* @memberOf module:Collecti... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/rejectSeries.js | lib/rejectSeries.js | import _reject from './internal/reject.js'
import eachOfSeries from './eachOfSeries.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
*
* @name rejectSeries
* @static
* @memberOf module:Collections
* @... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/filterLimit.js | lib/filterLimit.js | import _filter from './internal/filter.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
* time.
*
* @name filterLimit
* @static
* @memberOf module... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/ensureAsync.js | lib/ensureAsync.js | import setImmediate from './internal/setImmediate.js'
import { isAsync } from './internal/wrapAsync.js'
/**
* Wrap an async function and ensure it calls its callback on a later tick of
* the event loop. If the function already calls its callback on a next tick,
* no extra deferral is added. This is useful for prev... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/race.js | lib/race.js | import once from './internal/once.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'
/**
* Runs the `tasks` array of functions in parallel, without waiting until the
* previous function has completed. Once any of the `tasks` complete or pass an
* error to its callback,... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/timesSeries.js | lib/timesSeries.js | import timesLimit from './timesLimit.js'
/**
* The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
*
* @name timesSeries
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.times]{@link module:ControlFlow.times}
* @category Control Flow
* @param {... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/mapValues.js | lib/mapValues.js | import mapValuesLimit from './mapValuesLimit.js'
/**
* A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
*
* Produces a new Object by mapping each value of `obj` through the `iteratee`
* function. The `iteratee` is called each `value` and `key` from `obj` and a
* callback for whe... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/filterSeries.js | lib/filterSeries.js | import _filter from './internal/filter.js'
import eachOfSeries from './eachOfSeries.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
*
* @name filterSeries
* @static
* @memberOf module:Collections
* @... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/mapLimit.js | lib/mapLimit.js | import _map from './internal/map.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
*
* @name mapLimit
* @static
* @memberOf module:Collections
* @m... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/applyEach.js | lib/applyEach.js | import applyEach from './internal/applyEach.js'
import map from './map.js'
/**
* Applies the provided arguments to each function in the array, calling
* `callback` after all functions have completed. If you only provide the first
* argument, `fns`, then it will return a function which lets you pass in the
* argume... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/timeout.js | lib/timeout.js | import initialParams from './internal/initialParams.js'
import wrapAsync from './internal/wrapAsync.js'
/**
* Sets a time limit on an asynchronous function. If the function does not call
* its callback within the specified milliseconds, it will be called with a
* timeout error. The code property for the error objec... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/retry.js | lib/retry.js | import wrapAsync from './internal/wrapAsync.js'
import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js'
function constant(value) {
return function () {
return value;
}
}
/**
* Attempts to get a successful response from `task` no more than `times` times
* before returning an e... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/log.js | lib/log.js | import consoleFunc from './internal/consoleFunc.js'
/**
* Logs the result of an `async` function to the `console`. Only works in
* Node.js or in browsers that support `console.log` and `console.error` (such
* as FF and Chrome). If multiple arguments are returned from the async
* function, `console.log` is called o... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/groupBy.js | lib/groupBy.js | import groupByLimit from './groupByLimit.js'
/**
* Returns a new object, where each value corresponds to an array of items, from
* `coll`, that returned the corresponding key. That is, the keys of the object
* correspond to the values passed to the `iteratee` callback.
*
* Note: Since this function applies the `i... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/reflectAll.js | lib/reflectAll.js | import reflect from './reflect.js'
/**
* A helper function that wraps an array or an object of functions with `reflect`.
*
* @name reflectAll
* @static
* @memberOf module:Utils
* @method
* @see [async.reflect]{@link module:Utils.reflect}
* @category Util
* @param {Array|Object|Iterable} tasks - The collection... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/eachOfLimit.js | lib/eachOfLimit.js | import _eachOfLimit from './internal/eachOfLimit.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
* time.
*
* @name eachOfLimit
* @static
* @memberOf ... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/eachSeries.js | lib/eachSeries.js | import eachLimit from './eachLimit.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
*
* Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item
* in series and... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/auto.js | lib/auto.js | import once from './internal/once.js'
import onlyOnce from './internal/onlyOnce.js'
import wrapAsync from './internal/wrapAsync.js'
import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js'
/**
* Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
* their requi... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/eachLimit.js | lib/eachLimit.js | import eachOfLimit from './internal/eachOfLimit.js'
import withoutIndex from './internal/withoutIndex.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
*... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/tryEach.js | lib/tryEach.js | import eachSeries from './eachSeries.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'
/**
* It runs each task in series but stops whenever any of the functions were
* successful. If one of the tasks were successful, the `callback` will be
* passed the result of the s... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/everyLimit.js | lib/everyLimit.js | import createTester from './internal/createTester.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
*
* @name everyLimit
* @static
* @memberOf m... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/setImmediate.js | lib/setImmediate.js | import setImmediate from './internal/setImmediate.js'
/**
* Calls `callback` on a later loop around the event loop. In Node.js this just
* calls `setImmediate`. In the browser it will use `setImmediate` if
* available, otherwise `setTimeout(callback, 0)`, which means other higher
* priority events may precede the... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/queue.js | lib/queue.js | import queue from './internal/queue.js'
import wrapAsync from './internal/wrapAsync.js'
/**
* A queue of tasks for the worker function to complete.
* @typedef {Iterable} QueueObject
* @memberOf module:ControlFlow
* @property {Function} length - a function returning the number of items
* waiting to be processed. I... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/apply.js | lib/apply.js | /**
* Creates a continuation function with some arguments already applied.
*
* Useful as a shorthand when combined with other control flow functions. Any
* arguments passed to the returned function are added to the arguments
* originally passed to apply.
*
* @name apply
* @static
* @memberOf module:Utils
* @m... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/concat.js | lib/concat.js | import concatLimit from './concatLimit.js'
import awaitify from './internal/awaitify.js'
/**
* Applies `iteratee` to each item in `coll`, concatenating the results. Returns
* the concatenated list. The `iteratee`s are called in parallel, and the
* results are concatenated as they return. The results array will be r... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/eachOf.js | lib/eachOf.js | import isArrayLike from './internal/isArrayLike.js'
import breakLoop from './internal/breakLoop.js'
import eachOfLimit from './eachOfLimit.js'
import once from './internal/once.js'
import onlyOnce from './internal/onlyOnce.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/seq.js | lib/seq.js | import reduce from './reduce.js'
import wrapAsync from './internal/wrapAsync.js'
import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js'
/**
* Version of the compose function that is more natural to read. Each function
* consumes the return value of the previous function. It is the equivalent... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/transform.js | lib/transform.js | import eachOf from './eachOf.js'
import once from './internal/once.js'
import wrapAsync from './internal/wrapAsync.js'
import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js'
/**
* A relative of `reduce`. Takes an Object or Array, and iterates over each
* element in parallel, each step poten... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/detectLimit.js | lib/detectLimit.js | import createTester from './internal/createTester.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'
/**
* The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
* time.
*
* @name detectLimit
* @static
* @memb... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/iterator.js | lib/internal/iterator.js | import isArrayLike from './isArrayLike.js'
import getIterator from './getIterator.js'
function createArrayIterator(coll) {
var i = -1;
var len = coll.length;
return function next() {
return ++i < len ? {value: coll[i], key: i} : null;
}
}
function createES2015Iterator(iterator) {
var i = -... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/createTester.js | lib/internal/createTester.js | import breakLoop from './breakLoop.js'
import wrapAsync from './wrapAsync.js'
export default function _createTester(check, getResult) {
return (eachfn, arr, _iteratee, cb) => {
var testPassed = false;
var testResult;
const iteratee = wrapAsync(_iteratee)
eachfn(arr, (value, _, callb... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/once.js | lib/internal/once.js | export default function once(fn) {
function wrapper (...args) {
if (fn === null) return;
var callFn = fn;
fn = null;
callFn.apply(this, args);
}
Object.assign(wrapper, fn)
return wrapper
}
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/consoleFunc.js | lib/internal/consoleFunc.js | import wrapAsync from './wrapAsync.js'
export default function consoleFunc(name) {
return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => {
/* istanbul ignore else */
if (typeof console === 'object') {
/* istanbul ignore else */
if (err) {
/* ... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/breakLoop.js | lib/internal/breakLoop.js | // A temporary value used to identify if the loop should be broken.
// See #1064, #1293
const breakLoop = {};
export default breakLoop;
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/map.js | lib/internal/map.js | import wrapAsync from './wrapAsync.js'
export default function _asyncMap(eachfn, arr, iteratee, callback) {
arr = arr || [];
var results = [];
var counter = 0;
var _iteratee = wrapAsync(iteratee);
return eachfn(arr, (value, _, iterCb) => {
var index = counter++;
_iteratee(value, (e... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/reject.js | lib/internal/reject.js | import filter from './filter.js'
import wrapAsync from './wrapAsync.js'
export default function reject(eachfn, arr, _iteratee, callback) {
const iteratee = wrapAsync(_iteratee)
return filter(eachfn, arr, (value, cb) => {
iteratee(value, (err, v) => {
cb(err, !v);
});
}, callback... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/filter.js | lib/internal/filter.js | import isArrayLike from './isArrayLike.js'
import wrapAsync from './wrapAsync.js'
function filterArray(eachfn, arr, iteratee, callback) {
var truthValues = new Array(arr.length);
eachfn(arr, (x, index, iterCb) => {
iteratee(x, (err, v) => {
truthValues[index] = !!v;
iterCb(err);... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/awaitify.js | lib/internal/awaitify.js | // conditionally promisify a function.
// only return a promise if a callback is omitted
export default function awaitify (asyncFn, arity) {
if (!arity) arity = asyncFn.length;
if (!arity) throw new Error('arity is undefined')
function awaitable (...args) {
if (typeof args[arity - 1] === 'function')... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/parallel.js | lib/internal/parallel.js | import isArrayLike from './isArrayLike.js'
import wrapAsync from './wrapAsync.js'
import awaitify from './awaitify.js'
export default awaitify((eachfn, tasks, callback) => {
var results = isArrayLike(tasks) ? [] : {};
eachfn(tasks, (task, key, taskCb) => {
wrapAsync(task)((err, ...result) => {
... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/DoublyLinkedList.js | lib/internal/DoublyLinkedList.js | // Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
// used for queues. This implementation assumes that the node provided by the user can be modified
// to adjust the next and last properties. We implement only the minimal functionality
// for queue support.
export default cl... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/promiseCallback.js | lib/internal/promiseCallback.js | const PROMISE_SYMBOL = Symbol('promiseCallback')
function promiseCallback () {
let resolve, reject
function callback (err, ...args) {
if (err) return reject(err)
resolve(args.length > 1 ? args : args[0])
}
callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
resolve = res,
... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/range.js | lib/internal/range.js | export default function range(size) {
var result = Array(size);
while (size--) {
result[size] = size;
}
return result;
}
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/wrapAsync.js | lib/internal/wrapAsync.js | import asyncify from '../asyncify.js'
function isAsync(fn) {
return fn[Symbol.toStringTag] === 'AsyncFunction';
}
function isAsyncGenerator(fn) {
return fn[Symbol.toStringTag] === 'AsyncGenerator';
}
function isAsyncIterable(obj) {
return typeof obj[Symbol.asyncIterator] === 'function';
}
function wrapA... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/withoutIndex.js | lib/internal/withoutIndex.js | export default function _withoutIndex(iteratee) {
return (value, index, callback) => iteratee(value, callback);
}
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/getIterator.js | lib/internal/getIterator.js | export default function (coll) {
return coll[Symbol.iterator] && coll[Symbol.iterator]();
}
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/applyEach.js | lib/internal/applyEach.js | import wrapAsync from './wrapAsync.js'
import awaitify from './awaitify.js'
export default function (eachfn) {
return function applyEach(fns, ...callArgs) {
const go = awaitify(function (callback) {
var that = this;
return eachfn(fns, (fn, cb) => {
wrapAsync(fn).appl... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/onlyOnce.js | lib/internal/onlyOnce.js | export default function onlyOnce(fn) {
return function (...args) {
if (fn === null) throw new Error("Callback was already called.");
var callFn = fn;
fn = null;
callFn.apply(this, args);
};
}
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/isArrayLike.js | lib/internal/isArrayLike.js | export default function isArrayLike(value) {
return value &&
typeof value.length === 'number' &&
value.length >= 0 &&
value.length % 1 === 0;
}
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/eachOfLimit.js | lib/internal/eachOfLimit.js | import once from './once.js'
import iterator from './iterator.js'
import onlyOnce from './onlyOnce.js'
import {isAsyncGenerator, isAsyncIterable} from './wrapAsync.js'
import asyncEachOfLimit from './asyncEachOfLimit.js'
import breakLoop from './breakLoop.js'
export default (limit) => {
return (obj, iteratee, call... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/setImmediate.js | lib/internal/setImmediate.js | /* istanbul ignore file */
export var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask;
export var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
export var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
export function fallback(fn... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/queue.js | lib/internal/queue.js | import onlyOnce from './onlyOnce.js'
import setImmediate from './setImmediate.js'
import DLL from './DoublyLinkedList.js'
import wrapAsync from './wrapAsync.js'
export default function queue(worker, concurrency, payload) {
if (concurrency == null) {
concurrency = 1;
}
else if(concurrency === 0) {
... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/asyncEachOfLimit.js | lib/internal/asyncEachOfLimit.js | import breakLoop from './breakLoop.js'
// for async generators
export default function asyncEachOfLimit(generator, limit, iteratee, callback) {
let done = false
let canceled = false
let awaiting = false
let running = 0
let idx = 0
function replenish() {
//console.log('replenish')
... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/Heap.js | lib/internal/Heap.js | // Binary min-heap implementation used for priority queue.
// Implementation is stable, i.e. push time is considered for equal priorities
export default class Heap {
constructor() {
this.heap = [];
this.pushCount = Number.MIN_SAFE_INTEGER;
}
get length() {
return this.heap.length;
... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/lib/internal/initialParams.js | lib/internal/initialParams.js | export default function (fn) {
return function (...args/*, callback*/) {
var callback = args.pop();
return fn.call(this, args, callback);
};
}
| javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/dist/async.js | dist/async.js | (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.async = {}));
})(this, (functi... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | true |
caolan/async | https://github.com/caolan/async/blob/03fbed25c728e78b503df4f21e946948d9459cc9/dist/async.min.js | dist/async.min.js | (function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e="undefined"==typeof globalThis?e||self:globalThis,t(e.async={}))})(this,function(e){"use strict";function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t)... | javascript | MIT | 03fbed25c728e78b503df4f21e946948d9459cc9 | 2026-01-04T15:02:19.437008Z | false |
viatsko/awesome-vscode | https://github.com/viatsko/awesome-vscode/blob/95e0d5c41f72cb76f1547901c89ebc9a78753a4f/themes/theme-template.js | themes/theme-template.js | const btn = document.getElementById('btn')
let count = 0
function render() {
btn.innerText = `Count: ${count}`
}
btn.addEventListener('click', () => {
// Count from 1 to 10.
if (count < 10) {
count += 1
render()
}
}) | javascript | CC0-1.0 | 95e0d5c41f72cb76f1547901c89ebc9a78753a4f | 2026-01-04T15:02:16.864756Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/rollup.config.js | rollup.config.js | import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import postcss from 'rollup-plugin-postcss';
import uglify from 'rollup-plugin-uglify';
import autoprefixer from 'autoprefixer';
import cssnano from 'cssnano';
import pkg from './pac... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/scripts/run-cypress-tests.js | scripts/run-cypress-tests.js | const cypress = require('cypress');
const server = require('./start-server');
cypress.run().then(({ failures }) => {
server.close();
process.exit(failures === 0 ? 0 : 1);
});
| javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/scripts/start-server.js | scripts/start-server.js | const liveServer = require('live-server');
const params = {
port: 8080,
host: '0.0.0.0',
root: './demo',
watch: ['dist/**', 'demo/**'],
open: process.env.NODE_ENV !== 'test',
mount: [['/dist', './dist']],
noCssInject: true
};
const server = liveServer.start(params);
module.exports = server;
| javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/aos.js | src/js/aos.js | /**
* *******************************************************
* AOS (Animate on scroll) - wowjs alternative
* made to animate elements on scroll in both directions
* *******************************************************
*/
import styles from './../sass/aos.scss';
// Modules & helpers
import throttle from 'lodas... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/helpers/prepare.js | src/js/helpers/prepare.js | /* Clearing variables */
import { getPositionIn, getPositionOut } from './offsetCalculator';
import getInlineOption from './getInlineOption';
const prepare = function($elements, options) {
$elements.forEach((el, i) => {
const mirror = getInlineOption(el.node, 'mirror', options.mirror);
const once = getInlin... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/helpers/getInlineOption.js | src/js/helpers/getInlineOption.js | /**
* Get inline option with a fallback.
*
* @param {Node} el [Dom element]
* @param {String} key [Option key]
* @param {String} fallback [Default (fallback) value]
* @return {Mixed} [Option set with inline attributes or fallback value if not set]
*/
export default (el, key, fallback) => {
const attr = el.... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/helpers/offsetCalculator.js | src/js/helpers/offsetCalculator.js | /**
* Calculate offset
* basing on element's settings like:
* - anchor
* - offset
*
* @param {Node} el [Dom element]
* @return {Integer} [Final offset that will be used to trigger animation in good position]
*/
import getOffset from './../libs/offset';
import getInlineOption from './getInlineOption';
export ... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/helpers/detector.js | src/js/helpers/detector.js | /**
* Device detector
*/
const fullNameRe = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/helpers/handleScroll.js | src/js/helpers/handleScroll.js | import detect from './detector';
/**
* Adds multiple classes on node
* @param {DOMNode} node
* @param {array} classes
*/
const addClasses = (node, classes) =>
classes && classes.forEach(className => node.classList.add(className));
/**
* Removes multiple classes from node
* @param {DOMNode} node
* @param {ar... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/helpers/elements.js | src/js/helpers/elements.js | /**
* Generate initial array with elements as objects
* This array will be extended later with elements attributes values
* like 'position'
*/
export default () => {
const elements = document.querySelectorAll('[data-aos]');
return Array.prototype.map.call(elements, node => ({ node }));
};
| javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/libs/offset.js | src/js/libs/offset.js | /**
* Get offset of DOM element
* like there were no transforms applied on it
*
* @param {Node} el [DOM element]
* @return {Object} [top and left offset]
*/
const offset = function(el) {
let _x = 0;
let _y = 0;
while (el && !isNaN(el.offsetLeft) && !isNaN(el.offsetTop)) {
_x += el.offsetLeft - (el.tag... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/src/js/libs/observer.js | src/js/libs/observer.js | let callback = () => {};
function containsAOSNode(nodes) {
let i, currentNode, result;
for (i = 0; i < nodes.length; i += 1) {
currentNode = nodes[i];
if (currentNode.dataset && currentNode.dataset.aos) {
return true;
}
result = currentNode.children && containsAOSNode(currentNode.children)... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/support/index.js | cypress/support/index.js | import './commands';
| javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/support/commands.js | cypress/support/commands.js | Cypress.Commands.add('initAOS', settings => {
cy.window().then(({ AOS }) => {
AOS.init(settings);
});
});
Cypress.Commands.add('dispatchEvent', (eventName, times = 1) => {
cy.window().then(window => {
const event = new Event(eventName);
for (let i = 0; i < times; i++) {
window.document.dispatch... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_offset_spec.js | cypress/integration/settings_offset_spec.js | describe('setting: offset', function() {
context('global', () => {
before(() => {
cy.visit('/');
});
context('400px', () => {
before(() => {
cy.initAOS({
offset: 400
});
});
it('Should animate 3 items', function() {
cy.get('.aos-animate').should(... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_animatedClassName_spec.js | cypress/integration/settings_animatedClassName_spec.js | describe('setting: animatedClassName', function() {
context('with: "rawr"', function() {
before(() => {
cy.visit('/');
cy.initAOS({
animatedClassName: 'rawr'
});
});
it('Should set proper class names on AOS elements', function() {
cy.get('.aos-animate').should('have.length... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_anchorPlacement_spec.js | cypress/integration/settings_anchorPlacement_spec.js | describe('setting: anchorPlacement', function() {
beforeEach(() => {
cy.visit('/index.html');
cy.viewport(1280, 700);
});
context('global setting', () => {
it('Should be respected by all elements', () => {
cy.initAOS({
offset: 0,
anchorPlacement: 'top-center'
});
cy... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_useClassNames.js | cypress/integration/settings_useClassNames.js | describe('setting: useClassNames', function() {
context('just useClassNames', function() {
before(() => {
cy.visit('/animatecss.html');
cy.initAOS({
useClassNames: true
});
});
it('Should set proper custom class names on AOS elements', function() {
cy.get('.aos-animate').s... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/aos_spec.js | cypress/integration/aos_spec.js | describe('AOS', function() {
before(() => {
cy.visit('/');
cy.initAOS();
});
it('Should be defined', function() {
cy
.window()
.its('AOS')
.should('exist');
});
it('Should have init method', function() {
cy
.window()
.its('AOS.init')
.should('exist');
})... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_disable_spec.js | cypress/integration/settings_disable_spec.js | describe('setting: disable', function() {
beforeEach(() => {
cy.visit('/');
});
it('Should properly disable AOS', function() {
cy.initAOS({
disable: true
});
cy.get('.aos-item[data-aos]').should('have.length', 0);
cy.get('.aos-init').should('have.length', 0);
cy.get('.aos-animate')... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_duration_spec.js | cypress/integration/settings_duration_spec.js | describe('setting: duration', function() {
before(() => {
cy.visit('/');
});
it('Should set default duration attribue on body', function() {
cy.initAOS();
cy.get('body').should('have.attr', 'data-aos-duration', '400');
});
it('Should respect global duration setting and set attribue on body', fun... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_once_spec.js | cypress/integration/settings_once_spec.js | describe('setting: once', function() {
context('global', () => {
before(() => {
cy.visit('/');
cy.initAOS({
once: true
});
});
it('Should add aos-animate class on all visible elements', () => {
cy.get('.aos-animate').should('have.length', 6);
});
it('Should add ao... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_initClassName_spec.js | cypress/integration/settings_initClassName_spec.js | describe('setting: initClassName', function() {
context('with: "rawr"', function() {
before(() => {
cy.visit('/');
cy.initAOS({
initClassName: 'rawr'
});
});
it('Should set proper class names on AOS elements', function() {
cy.get('.aos-init').should('have.length', 0);
... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/mutation_spec.js | cypress/integration/mutation_spec.js | describe('mutation observer', function() {
before(() => {
cy.visit('/async.html');
cy.initAOS();
});
it('Should not animate any items if not present', function() {
cy.get('.aos-item').should('have.length', 0);
cy.get('.aos-animate').should('have.length', 0);
});
it('Should animate new items ... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_disableMutationObserver_spec.js | cypress/integration/settings_disableMutationObserver_spec.js | describe('setting: disableMutationObserver', function() {
before(() => {
cy.visit('/async.html');
cy.initAOS({
disableMutationObserver: true
});
});
it('Should not detect any changes in DOM, and thus not animate any elements as a result', function() {
cy.dispatchEvent('add-aos-item', 20);
... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/settings_delay_spec.js | cypress/integration/settings_delay_spec.js | describe('setting: delay', function() {
before(() => {
cy.visit('/');
});
it('Should set default delay attribue on body', function() {
cy.initAOS();
cy.get('body').should('have.attr', 'data-aos-delay', '0');
});
it('Should respect global delay setting and set attribue on body', function() {
... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
michalsnik/aos | https://github.com/michalsnik/aos/blob/329fb34f777034345f4d3f4def4dc3bcc300cc2e/cypress/integration/js_events_spec.js | cypress/integration/js_events_spec.js | describe('JS Events', function() {
context('default events', function() {
let aosInStub;
let aosOutStub;
before(() => {
aosInStub = cy.stub();
aosOutStub = cy.stub();
cy
.visit('/')
.document()
.then(document => {
document.addEventListener('aos:in', aos... | javascript | MIT | 329fb34f777034345f4d3f4def4dc3bcc300cc2e | 2026-01-04T15:02:25.536486Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.