var libob = require('libobject');
var transform = require('./lib/transform');
var translate = require('./lib/translate');
var logic = require('./lib/logic');
var mask = require('./lib/mask');
var stringify = require('./lib/stringify');
//var slice = require('./lib/slicer');
//var join = require('./lib/join');

exports.deep = function (options, data, next) {

    data = libob.deep(data);

    if (data instanceof Error) {
        return next(data);
    }

    next(null, data);
};

exports.flat = function (options, data, next) {

    data = libob.flat(data);

    if (data instanceof Error) {
        return next(data);
    }

    next(null, data);
};

exports.parse = function (options, data, next) {

    if (!data.data) {
        return next(null, data);
    }

    // try and parse buffer
    try {
        data.data = JSON.parse(data.data.toString());
    } catch (error) {
        return next(error);
    }

    return next(null, data);
}

exports.stringify = stringify;
exports.transform = transform;
exports.translate = translate;
exports.logic = logic;
exports.mask = mask;
//exports.slice = slice;
//exports.join = join;

@@ -189,25 +189,20 @@
 ');%0Avar 
-stringify
+json
  = requi
@@ -211,25 +211,20 @@
 ('./lib/
-stringify
+json
 ');%0A//va
@@ -659,284 +659,19 @@
 e = 
-function (options, data, next) %7B%0A%0A    if (!data.data) %7B%0A        return next(null, data);%0A    %7D%0A%0A    // try and parse buffer%0A    try %7B%0A        data.data = JSON.parse(data.data.toString());%0A    %7D catch (error) %7B%0A        return next(error);%0A    %7D%0A%0A    return next(null, data);%0A%7D%0A
+json.parse;
 %0Aexp
@@ -687,16 +687,21 @@
 ngify = 
+json.
 stringif

move parse method to json module