git ssb

2+

Dominic / pull-stream



Tree: cc048d2d98e1cd95038b14d5816dd19931a7b0fa

Files: cc048d2d98e1cd95038b14d5816dd19931a7b0fa / sources / once.js

313 bytesRaw
1'use strict'
2var abortCb = require('../util/abort-cb')
3
4module.exports = function once (value, onAbort) {
5 return function (abort, cb) {
6 if(abort)
7 return abortCb(cb, abort, onAbort)
8 if(value != null) {
9 var _value = value; value = null
10 cb(null, _value)
11 } else
12 cb(true)
13 }
14}
15
16
17

Built with git-ssb-web