Sha256: ca9816ba85ddd77847c3779c16147562d50c221ac8fc078951d04a74ac94e2d8
Contents?: true
Size: 390 Bytes
Versions: 43
Compression:
Stored size: 390 Bytes
Contents
'use strict' let callbacks = ['done', 'cb', 'callback', 'next'] module.exports = function isNamedCallback(potentialCallbackName, exceptions) { for (let i = 0; i < exceptions.length; i++) { callbacks = callbacks.filter(item => { return item !== exceptions[i] }) } return callbacks.some(trueCallbackName => { return potentialCallbackName === trueCallbackName }) }
Version data entries
43 entries across 43 versions & 1 rubygems