lib/index.js
function createDTrace(name) {
    // see https://github.com/mcavage/node-restify/issues/80 and
    // https://github.com/mcavage/node-restify/issues/100
    if (!DTRACE) {
        try {
            var d = require('dtrace-provider');
            DTRACE = d.createDTraceProvider(name);
        } catch (e) {
            DTRACE = {
                addProbe: function addProbe() {
                    var p = {
                        fire: function () {}
                    };
                    return (p);
                },
                enable: function enable() {},
                fire: function fire() {},
                removeProbe: function () {},
                disable: function () {}

            };
        }
    }
    return (DTRACE);
}
function createDTrace(name) {
    // see https://github.com/mcavage/node-restify/issues/80 and
    // https://github.com/mcavage/node-restify/issues/100
    if (!DTRACE) {
        try {
            var d = require('dtrace-provider');
            DTRACE = d.createDTraceProvider(name);
        } catch (e) {
            DTRACE = {
                addProbe: function addProbe() {
                    var p = {
                        fire: function () {}
                    };
                    return (p);
                },
                enable: function enable() {},
                fire: function fire() {},
                removeProbe: function () {},
                disable: function () {}

            };
        }
    }
    return (DTRACE);
}
function createDTrace ( name ) { // see https://github.com/mcavage/node-restify/issues/80 and // https://github.com/mcavage/node-restify/issues/100 if ( ! DTRACE ) { try { var d = require ( 'dtrace-provider' ) ; DTRACE = d . createDTraceProvider ( name ) ; } catch ( e ) { DTRACE = { addProbe : function addProbe ( ) { var p = { fire : function ( ) { } } ; return ( p ) ; } , enable : function enable ( ) { } , fire : function fire ( ) { } , removeProbe : function ( ) { } , disable : function ( ) { } } ; } } return ( DTRACE ) ; }
Shamelessly copied from https://github.com/mcavage/node-restify
Shamelessly copied from https : // github . com / mcavage / node - restify