dist/tulipan.cjs.js
/**
 * Build a getter function. Requires eval.
 *
 * We isolate the try/catch so it doesn't affect the
 * optimization of the parse function when it is not called.
 *
 * @param {String} body
 * @return {Function|undefined}
 */
Build a getter function. Requires eval.
We isolate the try/catch so it doesn't affect the
optimization of the parse function when it is not called.

@param {String} body
@return {Function|undefined}
Build a getter function . Requires eval . We isolate the try / catch so it doesn ' t affect the optimization of the parse function when it is not called . @param { String } body @return { Function|undefined }
function makeGetterFn(body) {
  try {
    return new Function('scope', 'return ' + body + ';');
  } catch (e) {
    if ('development' !== 'production') {
      if (e.toString().match(/unsafe-eval|CSP/)) {
        warn('It seems you are using the default build of TurpialCore.js in an environment ' + 'with Content Security Policy that prohibits unsafe-eval. ' + 'Use the CSP-compliant build instead: ' + 'http://TurpialCorejs.org/guide/installation.html#CSP-compliant-build');
      } else {
        warn('Invalid expression. ' + 'Generated function body: ' + body);
      }
    }
    return noop;
  }
}
function makeGetterFn ( body ) { try { return new Function ( 'scope' , 'return ' + body + ';' ) ; } catch ( e ) { if ( 'development' !== 'production' ) { if ( e . toString ( ) . match ( / unsafe-eval|CSP / ) ) { warn ( 'It seems you are using the default build of TurpialCore.js in an environment ' + 'with Content Security Policy that prohibits unsafe-eval. ' + 'Use the CSP-compliant build instead: ' + 'http://TurpialCorejs.org/guide/installation.html#CSP-compliant-build' ) ; } else { warn ( 'Invalid expression. ' + 'Generated function body: ' + body ) ; } } return noop ; } }
Build a getter function.
Build a getter function .
/* eslint-disable no-new-func */ /* eslint-enable no-new-func */ /* istanbul ignore if */