Skip to content

Commit

Permalink
chore(transducers): update deps, readme, re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed May 14, 2018
1 parent 2bebba2 commit fc6acd1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
23 changes: 16 additions & 7 deletions packages/transducers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This project is part of the

## About

Lightweight transducer implementations for ES6 / TypeScript (~24KB
minified, full lib).
Lightweight transducer and supporting generators / iterator
implementations for ES6 / TypeScript (~8.4KB gzipped, full lib).

## TOC

Expand All @@ -24,14 +24,15 @@ minified, full lib).

## About

This library provides altogether 90+ transducers, reducers and sequence
generators (iterators) for composing data transformation pipelines.
This library provides altogether 130+ transducers, reducers, sequence
generators (iterators) and other supporting functions for composing data
transformation pipelines.

The overall concept and many of the core functions offered here are
directly inspired by the original Clojure implementation by Rich Hickey,
though the implementation does differ (also in contrast to some other JS
based implementations) and dozens of less common, but generally highly
useful operators have been added. See full list below.
though the implementation does heavily differ (also in contrast to some
other JS based implementations) and dozens of less common, but generally
highly useful operators have been added. See full list below.

The
[@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/master/packages/rstream)
Expand Down Expand Up @@ -617,6 +618,8 @@ itself. Returns nothing.

#### `filter<T>(pred: Predicate<T>): Transducer<T, T>`

#### `filterFuzzy<A, B>(query: ArrayLike<B>, key?: (x: A) => ArrayLike<B>, eq?: Predicate2<any>): Transducer<A, A>`

#### `flatten<T>(): Transducer<T | Iterable<T>, T>`

#### `flattenWith<T>(fn: (x: T) => Iterable<T>): Transducer<T | Iterable<T>, T>`
Expand Down Expand Up @@ -787,6 +790,12 @@ itself. Returns nothing.

#### `vals<T>(x: IObjectOf<T>): IterableIterator<T>`

#### `wrapBoth<T>(src: T[], n?: number): IterableIterator<T>`

#### `wrapLeft<T>(src: T[], n?: number): IterableIterator<T>`

#### `wrapRight<T>(src: T[], n?: number): IterableIterator<T>`

## Authors

- Karsten Schmidt
Expand Down
3 changes: 2 additions & 1 deletion packages/transducers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@thi.ng/api": "^4.0.1",
"@thi.ng/checks": "^1.5.3",
"@thi.ng/compare": "^0.1.1",
"@thi.ng/equiv": "^0.1.1",
"@thi.ng/errors": "^0.1.2"
},
"keywords": [
Expand All @@ -43,4 +44,4 @@
"publishConfig": {
"access": "public"
}
}
}
5 changes: 5 additions & 0 deletions packages/transducers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export * from "./xform/drop-while";
export * from "./xform/drop";
export * from "./xform/duplicate";
export * from "./xform/filter";
export * from "./xform/filter-fuzzy";
export * from "./xform/flatten-with";
export * from "./xform/flatten";
export * from "./xform/hex-dump";
Expand Down Expand Up @@ -96,6 +97,7 @@ export * from "./func/deep-transform";
export * from "./func/delay";
export * from "./func/ensure-iterable";
export * from "./func/even";
export * from "./func/fuzzy-match";
export * from "./func/hex";
export * from "./func/identity";
export * from "./func/juxt";
Expand All @@ -122,3 +124,6 @@ export * from "./iter/repeatedly";
export * from "./iter/reverse";
export * from "./iter/tuples";
export * from "./iter/vals";
export * from "./iter/wrap-both";
export * from "./iter/wrap-left";
export * from "./iter/wrap-right";

0 comments on commit fc6acd1

Please sign in to comment.