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

18 lines
329 B
JavaScript

"use strict";
const stream = require("./stream");
module.exports = function (state) {
const isCss = require("./is-css")(state);
return function cssOnlyStream(handler, flushHandler) {
return stream((item) => {
if (isCss(item)) {
return handler(item);
} else {
return [ item ];
}
}, flushHandler);
};
};