Skip to content

Commit

Permalink
remove flatMap since it is replaced by flyd.chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Einar Norðfjörð committed Feb 12, 2018
1 parent 11513ae commit f3a899b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 89 deletions.
3 changes: 1 addition & 2 deletions examples/drag-and-drop/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var flyd = require('flyd');
var flatMap = require('flyd/module/flatmap');
var takeUntil = require('flyd/module/takeuntil');

document.addEventListener('DOMContentLoaded', function() {
Expand All @@ -13,7 +12,7 @@ document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('mousemove', mousemove);
document.addEventListener('mouseup', mouseup);

var mousedrag = flatMap(function(md) {
var mousedrag = flyd.chain(function(md) {
var startX = md.offsetX, startY = md.offsetY;

return takeUntil(flyd.map(function(mm) {
Expand Down
10 changes: 0 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,6 @@ declare module 'flyd/module/filter' {
export = _Filter;
}

declare module 'flyd/module/flatmap' {
type projection<T, V> = (val: T) => flyd.Stream<V>;
interface flatMap {
<T, V>(project: projection<T, V>, source: flyd.Stream<T>): flyd.Stream<V>;
<T, V>(project: projection<T, V>): (source: flyd.Stream<T>) => flyd.Stream<V>;
}
const _flatMap: flatMap;
export = _flatMap;
}

declare module 'flyd/module/forwardto' {
interface ForwardTo {
<T, V>(stream: flyd.Stream<V>, project: (value: V) => T): flyd.Stream<T>;
Expand Down
54 changes: 0 additions & 54 deletions module/flatmap/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions module/flatmap/index.js

This file was deleted.

0 comments on commit f3a899b

Please sign in to comment.