From 9b1655755a1a02cafa40e4f82a0c22054ed96e18 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 19 Jul 2020 21:01:24 +0200 Subject: [PATCH] Initial commit --- .gitignore | 1 + README.md | 7 +++++++ index.js | 8 ++++++++ package.json | 11 +++++++++++ yarn.lock | 8 ++++++++ 5 files changed, 35 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 index.js create mode 100644 package.json create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/README.md b/README.md new file mode 100644 index 0000000..74b223e --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# @ppstreams/aborted-marker + +__Note:__ This documentation is incomplete. + +A simple custom error type for marking the end of a [ppstreams](https://ppstreams.cryto.net/) stream. You'd usually only need this module when you're implementing a custom source stream. + +If you just want a stream that produces a value every time one is requested, and that doesn't need to clean up any external resources like file handles or network connections, use the [simple-source](https://www.npmjs.com/package/@ppstreams/simple-source) module instead. diff --git a/index.js b/index.js new file mode 100644 index 0000000..69d0018 --- /dev/null +++ b/index.js @@ -0,0 +1,8 @@ +"use strict"; + +const createError = require("create-error"); + +module.exports = createError("Aborted", { + __ppstreams_isAbortedMarker: true, + __ppstreams_specVersion: 1 +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..a007612 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "@ppstreams/aborted", + "version": "0.1.0", + "main": "index.js", + "repository": "http://git.cryto.net/ppstreams/aborted.git", + "author": "Sven Slootweg ", + "license": "WTFPL OR CC0-1.0", + "dependencies": { + "create-error": "^0.3.1" + } +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..18fdc6d --- /dev/null +++ b/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +create-error@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/create-error/-/create-error-0.3.1.tgz#69810245a629e654432bf04377360003a5351a23" + integrity sha1-aYECRaYp5lRDK/BDdzYAA6U1GiM=