Skip to content

piping #94

Open
Open
@icambron

Description

@icambron

One thing that frustrates me about the gobble API is that I can't figure out how to compose things. Specifically, I want to do something like this:

var foo = function(node){
  return node.transform('stuff').transform('more-stuff');
}

gobble('src').pipe(foo).moveTo('place');
gobble('otherSrc').pipe(foo).moveTo('otherPlace');

I think pipe is probably a very simple function on Node that looks something like:

pipe(f){
  return f(this);
}

So...is there:

a) a way I'm missing to accomplish this?
b) a way of hacking this in from userspace (I couldn't figure out how to monkey patch it)?
c) a chance you'd take that addition as a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions