PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@es-joy/jsdoccomment/node_modules/comment-parser/src/transforms

Просмотр файла: crlf.ts

import { Transform } from './index.js';
import { Block, Line } from '../primitives.js';
import { rewireSource } from '../util.js';

const order = [
  'end',
  'description',
  'postType',
  'type',
  'postName',
  'name',
  'postTag',
  'tag',
  'postDelimiter',
  'delimiter',
  'start',
];

export type Ending = 'LF' | 'CRLF';

export default function crlf(ending: Ending): Transform {
  function update(line: Line): Line {
    return {
      ...line,
      tokens: { ...line.tokens, lineEnd: ending === 'LF' ? '' : '\r' },
    };
  }

  return ({ source, ...fields }: Block): Block =>
    rewireSource({ ...fields, source: source.map(update) });
}

Выполнить команду


Для локальной разработки. Не используйте в интернете!