git ssb

2+

Dominic / pull-stream



Tree: d48c65ac71736fb2bc9e028edad34616a98ee895

Files: d48c65ac71736fb2bc9e028edad34616a98ee895 / 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