Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@creuna/utils

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@creuna/utils - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

create-pipe.js

10

CHANGELOG.md
# Changelog
# 1.0.0
## 1.1.0
* Renames `isElementInViewport` to `isFullyInViewport`
* Adds `isInViewport`
- Adds `pipe` and `pipeValue`
## 1.0.0
- Renames `isElementInViewport` to `isFullyInViewport`
- Adds `isInViewport`
## 0.4.0

@@ -9,0 +13,0 @@

@@ -36,2 +36,8 @@ "use strict";

});
Object.defineProperty(exports, "CreatePipe", {
enumerable: true,
get: function get() {
return _createPipe.default;
}
});
Object.defineProperty(exports, "DeepClone", {

@@ -91,2 +97,8 @@ enumerable: true,

});
Object.defineProperty(exports, "Pipe", {
enumerable: true,
get: function get() {
return _pipe.default;
}
});
Object.defineProperty(exports, "RangeMap", {

@@ -157,2 +169,4 @@ enumerable: true,

var _createPipe = _interopRequireDefault(require("./create-pipe"));
var _deepClone = _interopRequireDefault(require("./deep-clone"));

@@ -176,2 +190,4 @@

var _pipe = _interopRequireDefault(require("./pipe"));
var _rangeMap = _interopRequireDefault(require("./range-map"));

@@ -178,0 +194,0 @@

{
"name": "@creuna/utils",
"version": "1.0.0",
"version": "1.1.0",
"description": "Creuna js utils",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -88,2 +88,19 @@ # Creuna JS utils

### createPipe(_...functions_)
_@creuna/utils/create-pipe_
- `functions`: any number of functions
- returns: function
The pipe combines n functions, calling each function with the output of the last one. To actually execute the pipeline, call the returned function with a value. More on this concept [here](https://medium.com/front-end-weekly/pipe-and-compose-in-javascript-5b04004ac937).
```js
pipe(
removeSpaces,
capitalize,
reverseString
)("a b c"); // "CBA"
```
### deepClone(_thing_)

@@ -199,2 +216,16 @@

### pipe(_value, ...functions_)
_@creuna/utils/pipe_
- `value`: any value
- `functions`: any number of functions
- returns: any (the result of running `value` through the pipeline)
A function that emulates the [pipeline operator](https://github.com/tc39/proposal-pipeline-operator). For more advanced composition stuff, see `createPipe`.
```js
pipeValue("a b c", removeSpaces, capitalize, reverseString); // "CBA"
```
### rangeMap(_val, inMin, inMax, outMin, outMax_)

@@ -201,0 +232,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc