Skip to content

Commit 4250fe9

Browse files
committed
use 'export=' in rxjs.dev app
exports the function so a commonjs script can require() it directly.
1 parent a902127 commit 4250fe9

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

apps/rxjs.dev/tools/marbles/scripts/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ readdir(diagramsPath, (err, files) => {
3838
Promise.all(files.map(fileName => renderMarble(diagramsPath, fileName)))
3939
.then(_ => console.log('All SVGs created'))
4040
.catch(e => console.error('generating SVGs failed', e));
41-
});
41+
});

apps/rxjs.dev/tools/transforms/angular-base-package/services/filterFromInImports.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
* unfiltered, thus it will get the link to
1212
* /api/index/function/from
1313
*/
14-
module.exports = function filterFromInImports(): (words: string[], index: number) => boolean {
14+
function filterFromInImports(): (words: string[], index: number) => boolean {
1515
return (words: string[], index: number) => {
1616
const previousWord = words[index - 1];
1717
const nextWord = words[index + 1];
1818

1919
return words[index] === 'from' && /}/.test(previousWord) && /'/.test(nextWord);
2020
};
2121
};
22+
23+
export = filterFromInImports

0 commit comments

Comments
 (0)