Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@shun-shobon/pipes
Advanced tools
pipes
is a lightweight JavaScript/TypeScript library designed to reduce function nesting and help you write more readable code. It leverages a fluent interface to facilitate more readable function compositions.
.pipe()
method allows for readable chained function calls.Install pipes
using your favorite package manager with the following command:
npm install @shun-shobon/pipes
Here's how you can use pipes
to simplify nested function calls:
import { pipe } from "@shun-shobon/pipes";
const value = pipe(1)
.pipe((x) => x + 2)
.pipe((x) => x * 2).value;
console.log(value); // 6
In the above example:
pipe
with a value of 1
.2
to this value in the first .pipe()
method..pipe()
method, we multiply the result of the previous operation by 2
..value
property.6
, is then logged to the console.pipe(initialValue)
Creates a new pipe with the given initial value.
.pipe(function)
Applies the given function to the current value and returns a new pipe with the updated value.
.value
Gets the current value of the pipe.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A simple pipe library for TypeScript
The npm package @shun-shobon/pipes receives a total of 3 weekly downloads. As such, @shun-shobon/pipes popularity was classified as not popular.
We found that @shun-shobon/pipes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.