Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports.examples = () => {
if (valueResolver === undefined) {
// see issue: https://github.com/Microsoft/Recognizers-Text/issues/974
console.error('ERR: package does not include valueResolver');
return;
}
// When you give the recognzier the text "Wednesday 4 o'clock" you get these distinct TIMEX values back.
const today = new Date();
const resolution = valueResolver.resolve(['XXXX-WXX-3T04', 'XXXX-WXX-3T16'], today);
console.log(resolution.values.length);
resolution.values.forEach(({ timex, type, value }) => {
console.log(timex);
console.log(type);
console.log(value);
});
};