Thursday, 25 May 2017

Is xpath.useNamespaces thread safe?

Trying to use https://www.npmjs.com/package/xpath

var xpath = require('xpath');

var xpath_select = xpath.useNamespaces({
    "my": "http://my.com/core/api"
});

module.exports.handler = function (request, context, callback) {
    ...
    xpath_select(...)
    ...
};

Should I move xpath_select initialization to handler function or I can initialize it once at startup?



via Boris

No comments:

Post a Comment