Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 603B

1234567891011121314151617181920
  1. import { FORMAT_DEFAULT } from '../../constant';
  2. import { u, englishFormats } from './utils';
  3. export default (function (o, c, d) {
  4. var proto = c.prototype;
  5. var oldFormat = proto.format;
  6. d.en.formats = englishFormats;
  7. proto.format = function (formatStr) {
  8. if (formatStr === void 0) {
  9. formatStr = FORMAT_DEFAULT;
  10. }
  11. var _this$$locale = this.$locale(),
  12. _this$$locale$formats = _this$$locale.formats,
  13. formats = _this$$locale$formats === void 0 ? {} : _this$$locale$formats;
  14. var result = u(formatStr, formats);
  15. return oldFormat.call(this, result);
  16. };
  17. });