git ssb

2+

Dominic / pull-stream



Tree: 2d4523dffda72662b6872ac393ee20e811eee7b1

Files: 2d4523dffda72662b6872ac393ee20e811eee7b1 / 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