@tbela99/css-parser
    Preparing search index...

    Function transform

    • transform css

      Parameters

      • css: string | ReadableStream<string>
      • options: TransformOptions = {}

        Example:


        import {transform} from '@tbela99/css-parser';

        // css string
        let result = await transform(css);
        console.log(result.code);

        Example using stream


        import {transform} from '@tbela99/css-parser';
        import {Readable} from "node:stream";

        // usage: node index.ts < styles.css or cat styles.css | node index.ts

        const readableStream = Readable.toWeb(process.stdin);
        const result = await transform(readableStream, {beautify: true});

        console.log(result.code);

        Example using fetch


        import {transform} from '@tbela99/css-parser';

        const response = await fetch('https://docs.deno.com/styles.css');
        result = await transform(response.body, {beautify: true});

        console.log(result.code);

      Returns Promise<TransformResult>