From 566a68d1260cbe6e1579d838f53543e7a17bfd73 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 20 Jul 2020 16:02:39 +0200 Subject: [PATCH] Initial commit --- index.js | 9 +++++++++ package.json | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 index.js create mode 100644 package.json 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" +}