StringArrayRule.ts 562 B

123456789101112131415161718192021
  1. import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRule';
  2. import { IOptions } from '../../interfaces/options/IOptions';
  3. /**
  4. * @param {IOptions} options
  5. * @returns {IOptions}
  6. */
  7. export const StringArrayRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
  8. if (!options.stringArray) {
  9. options = {
  10. ...options,
  11. rotateStringArray: false,
  12. stringArray: false,
  13. stringArrayEncoding: false,
  14. stringArrayThreshold: 0
  15. };
  16. }
  17. return options;
  18. };