Kaynağa Gözat

Added missing definitions (not all).

Eugene Lazutkin 3 yıl önce
ebeveyn
işleme
f7e401566b
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      defs.js

+ 3 - 1
defs.js

@@ -3,6 +3,7 @@
 const none = Symbol.for('object-stream.none');
 const finalSymbol = Symbol.for('object-stream.final');
 const manySymbol = Symbol.for('object-stream.many');
+const stop = Symbol.for('object-stream.stop');
 
 const finalValue = value => ({[finalSymbol]: value});
 const many = values => ({[manySymbol]: values});
@@ -13,9 +14,10 @@ const isMany = o => o && typeof o == 'object' && manySymbol in o;
 const getFinalValue = o => o[finalSymbol];
 const getManyValues = o => o[manySymbol];
 
-class Stop {}
+class Stop extends Error {}
 
 module.exports.none = none;
+module.exports.stop = stop;
 module.exports.finalValue = finalValue;
 module.exports.isFinalValue = isFinalValue;
 module.exports.getFinalValue = getFinalValue;