var pristineEnv = require('./pristine-env');

function macgyver(thing) {
    if (Object.prototype.toString.call(thing) === '[object Array]') {
        return (new pristineEnv().Array(0)).concat(thing);
    } else {
        return thing;
    }
}

module.exports = macgyver;

var pristineEnv = require('./pristine-env');

var pristineObject = pristineEnv().Object;
var pristineArray = pristineEnv().Array;

function macgyver(thing) {
    if (pristineObject.prototype.toString.call(thing) === '[object Array]') {
        return (new pristineArray()).concat(thing);
    } else {
        return thing;
    }
}

module.exports = macgyver;

Use pristine Object to work out if a thing is an array
Use pristine Object to work out if a thing is an array
