@transformation/core
Advanced tools
Comparing version 4.2.0 to 4.3.0
{ | ||
"name": "@transformation/core", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Create transformation pipelines", | ||
@@ -25,4 +25,4 @@ "main": "./src/index.js", | ||
"devDependencies": { | ||
"mocha": "9.1.4", | ||
"sinon": "^12.0.1", | ||
"mocha": "9.2.0", | ||
"sinon": "^13.0.1", | ||
"unexpected": "12.0.3", | ||
@@ -34,3 +34,3 @@ "unexpected-steps": "^4.2.0" | ||
}, | ||
"gitHead": "88a4660cbb267db5a8ee7eb57bb38a528519c036" | ||
"gitHead": "cc0a5f8ae54b5643e1ea964ef1d369703d47dc4d" | ||
} |
# @transformation/core | ||
<!-- toc --> | ||
- [accumulate](#accumulate) | ||
- [appendItems](#appenditems) | ||
- [buffer](#buffer) | ||
- [fixed buffer (default)](#fixed-buffer-default) | ||
- [dropping buffer](#dropping-buffer) | ||
- [sliding buffer](#sliding-buffer) | ||
- [chose](#chose) | ||
- [cleanup](#cleanup) | ||
- [debounce](#debounce) | ||
- [deduplicate](#deduplicate) | ||
- [deduplicateBy](#deduplicateby) | ||
- [delay](#delay) | ||
- [emitAll](#emitall) | ||
- [emitItems](#emititems) | ||
- [emitRange](#emitrange) | ||
- [emitRepeat](#emitrepeat) | ||
- [extend](#extend) | ||
- [frequencies](#frequencies) | ||
- [parallel](#parallel) | ||
- [prependItems](#prependitems) | ||
- [filter](#filter) | ||
- [flatMap](#flatmap) | ||
- [forEach](#foreach) | ||
- [fork](#fork) | ||
- [fromJSON](#fromjson) | ||
- [groupBy](#groupby) | ||
- [interleave](#interleave) | ||
- [join](#join) | ||
- [keyBy](#keyby) | ||
- [map](#map) | ||
- [memorize](#memorize) | ||
- [partition](#partition) | ||
- [partitionBy](#partitionby) | ||
- [pipeline](#pipeline) | ||
- [program](#program) | ||
- [reduce](#reduce) | ||
- [reverse](#reverse) | ||
- [setup](#setup) | ||
- [skipLast](#skiplast) | ||
- [skip](#skip) | ||
- [sortBy](#sortby) | ||
- [sort](#sort) | ||
- [splitIterable](#splititerable) | ||
- [take](#take) | ||
- [tap](#tap) | ||
- [throttle](#throttle) | ||
- [toArray](#toarray) | ||
- [toJSON](#tojson) | ||
- [transform](#transform) | ||
- [uniq](#uniq) | ||
- [uniqBy](#uniqby) | ||
- [unless](#unless) | ||
- [when](#when) | ||
- [withGroup](#withgroup) | ||
- [Utilities](#utilities) | ||
- [takeAll](#takeall) | ||
- [Building new steps](#building-new-steps) | ||
<!-- tocstop --> | ||
## accumulate | ||
@@ -329,2 +267,30 @@ | ||
## defaults | ||
Provide default values for any object. | ||
```js | ||
const { defaults } = require("@transformation/core"); | ||
``` | ||
```js | ||
await expect( | ||
pipeline( | ||
emitItems(null, { value: "one" }, 2, { stuff: "three" }, 4), | ||
defaults({ | ||
type: "object", | ||
metadata: {}, | ||
}) | ||
), | ||
"to yield items", | ||
[ | ||
null, | ||
{ type: "object", metadata: {}, value: "one" }, | ||
2, | ||
{ type: "object", metadata: {}, stuff: "three" }, | ||
4, | ||
] | ||
); | ||
``` | ||
## delay | ||
@@ -331,0 +297,0 @@ |
@@ -11,2 +11,3 @@ const Group = require("./Group"); | ||
const deduplicateBy = require("./deduplicateBy"); | ||
const defaults = require("./defaults"); | ||
const delay = require("./delay"); | ||
@@ -71,2 +72,3 @@ const emitAll = require("./emitAll"); | ||
deduplicateBy, | ||
defaults, | ||
delay, | ||
@@ -73,0 +75,0 @@ emitAll, |
149415
119
3728
2015