UNPKG

@agreed/core

Version:

agreed is a mock server and test client, agreed will be helper for Consumer Driven Contract

21 lines (17 loc) 906 B
"use strict"; const OPERATIONAL_STRINGS = "\\w+"; const REGEXP_STRING = `{(${OPERATIONAL_STRINGS})*:([\\w|\\.|,|:|\\[|\\]|\\-]+)\\}`; const BRACKETS_STRING = "\\[:([\\w]+)\\]"; const REST_ARRAY_STRING = "{:.+\\d+-last}"; const TEMPLATE_REGEXP_GLOBAL = new RegExp(REGEXP_STRING, "g"); const TEMPLATE_REGEXP = new RegExp(REGEXP_STRING); const TEMPLATE_BRACKETS_REGEXP_GLOBAL = new RegExp(BRACKETS_STRING, "g"); const TEMPLATE_BRACKETS_REGEXP = new RegExp(BRACKETS_STRING); const TEMPLATE_REST_ARRAY_STRING_GLOBAL = new RegExp(REST_ARRAY_STRING, "g"); module.exports.TEMPLATE_REGEXP = TEMPLATE_REGEXP; module.exports.TEMPLATE_REGEXP_GLOBAL = TEMPLATE_REGEXP_GLOBAL; module.exports.TEMPLATE_BRACKETS_REGEXP = TEMPLATE_BRACKETS_REGEXP; module.exports.TEMPLATE_BRACKETS_REGEXP_GLOBAL = TEMPLATE_BRACKETS_REGEXP_GLOBAL; module.exports.TEMPLATE_REST_ARRAY_STRING_GLOBAL = TEMPLATE_REST_ARRAY_STRING_GLOBAL;