The mftJS language (sneak-a-peek)

The mftJS language is like JavaScript, actually it is JavaScript, nearly 100% compatible with the ECMA5 specification, but it has several additional functions and methods specifically designed to develop Managed File Transfer scripts.

The following are some limitations with mftJS:

  • “use strict” will parse, but won’t have any effect
  • The regular expression engine (re2/regexp) is not fully compatible with the ECMA5 specification
  • mftJS targets ES5. ES6 features (eg: Typed Arrays) are not supported

In addition to the above, some specific limitations apply to the way regular expressions are handled. Therefore, the following syntax is incompatible:

  • (?=)  // Lookahead (positive), currently raises a parsing error
  • (?!)  // Lookahead (backhead), currently raises a parsing error
  • \1   // Backreference (\1, \2, \3, …), currently raises a parsing error

Aside from that, JavaScript programmers will feel extremely familiar with mftJS, and the added power of high-level MFT-specific functions, will make developing MFT tasks with this language a real breeze.

Let’s look at a short code sample:

Continue reading