function addResponse(location, response) {
    const matched = parseRoute(location);
    _mkNode(responses, matched.name, {})
    if (matched.name === 'post') {
        _mkNode(responses[matched.name], matched.year, {})
        _mkNode(responses[matched.name][matched.year], matched.month, {})
        responses[matched.name][matched.year][matched.month][matched.slug] = response;
    } else {
        responses[matched.name][matched.slug] = response;
    }
}
/* addResponse(location, responseObject)
 * 
 * Add the response you want to set for this location.
 *
 * Location templates that are supported:
 *
 * /r/
 * /r/index
 * /r/index/p/:pageNumber
 * /r/category/:slug
 * /r/category/:slug/p/:pageNumber
 * /r/tag/:slug
 * /r/tag/:slug/p/:pageNumber
 * /r/page/:slug
 * /r/post/:year/:month/:slug
 */


Add the response you want to set for this location.

Location templates that are supported.


Add the response you want to set for this location . Location templates that are supported .
function addResponse(location, response) {
    const matched = parseRoute(location);
    _mkNode(responses, matched.name, {})
    if (matched.name === 'post') {
        _mkNode(responses[matched.name], matched.year, {})
        _mkNode(responses[matched.name][matched.year], matched.month, {})
        responses[matched.name][matched.year][matched.month][matched.slug] = response;
    } else {
        responses[matched.name][matched.slug] = response;
    }
}
function addResponse ( location , response ) { const matched = parseRoute ( location ) ; _mkNode ( responses , matched . name , { } ) if ( matched . name === 'post' ) { _mkNode ( responses [ matched . name ] , matched . year , { } ) _mkNode ( responses [ matched . name ] [ matched . year ] , matched . month , { } ) responses [ matched . name ] [ matched . year ] [ matched . month ] [ matched . slug ] = response ; } else { responses [ matched . name ] [ matched . slug ] = response ; } }
addResponse(location, responseObject)
addResponse ( location responseObject )