apply-generator.mjs 387 B

1234567891011121314
  1. import { isGenerator } from '../../generators/utils/is-generator.mjs';
  2. function applyGeneratorOptions({ type, ...options }) {
  3. if (isGenerator(type)) {
  4. return type.applyToOptions(options);
  5. }
  6. else {
  7. options.duration ?? (options.duration = 300);
  8. options.ease ?? (options.ease = "easeOut");
  9. }
  10. return options;
  11. }
  12. export { applyGeneratorOptions };