commit 566a68d1260cbe6e1579d838f53543e7a17bfd73 Author: Sven Slootweg Date: Mon Jul 20 16:02:39 2020 +0200 Initial commit diff --git a/index.js b/index.js new file mode 100644 index 0000000..c01a1e5 --- /dev/null +++ b/index.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function isAborted(value) { + return ( + value != null + && typeof value === "object" + && value.__ppstreams_isAbortedMarker === true + ); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..c693187 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "@ppstreams/is-aborted", + "version": "0.1.0", + "main": "index.js", + "repository": "http://git.cryto.net/ppstreams/is-aborted.git", + "author": "Sven Slootweg ", + "license": "WTFPL OR CC0-1.0" +}