You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
313 B

'use strict'
var abortCb = require('../util/abort-cb')
module.exports = function once (value, onAbort) {
return function (abort, cb) {
if(abort)
return abortCb(cb, abort, onAbort)
if(value != null) {
var _value = value; value = null
cb(null, _value)
} else
cb(true)
}
}