Skip to content

yocontra/revisit

Repository files navigation

revisit NPM version Downloads Support us Build Status Coveralls Status

Information

Package revisit
Description Wrapper around revisit.link spec
Node Version >= 0.10

This is a work in progress - stay tuned.

Usage

Install

npm install revisit --save

Examples

Server

var revisit = require('revisit');
var map = require('through2-map');

function glitch(query) {
  return map(function(buf, idx){
    // do some stuff to the buffer
    return buf;
  });
}

// start a server that transforms data
var server = revisit.server(glitch).listen(8080);

// revisit.server returns an express server
// so you can tack on any middleware here
server.listen(8080);

Client

var revisit = require('revisit');

var data = fs.createReadStream('yo.jpg');

var glitch = revisit.transform('http://meatcub.es:8000/glitch?direction=horizontal');
var messColor = revisit.transform('http://meatcub.es:8000/colorize?tint=solar');

// write file to server
data
  .pipe(glitch())
  .pipe(messColor())
  .pipe(fs.createWriteStream('yo-glitched.jpg'));

LICENSE

(MIT License)

Copyright (c) 2014 Eric Schoffstall contra@wearefractal.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Wrapper around revisit.link spec

Resources

License

Stars

Watchers

Forks

Packages

No packages published