How to use the licia.startWith function in licia

To help you get started, we’ve selected a few licia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liriliri / licia / lib / update.js View on Github external
comments.forEach(comment => {
                comment = trim(comment);
                if (startWith(comment, 'example')) {
                    example = comment.replace(/^example/, '');
                    example = outdentOneSpace(example);
                    example = example.replace(regTsIgnore, '');
                    example = '```javascript\n' + trim(example) + '\n```';
                }
            });
            doc = splitH2(doc);
github liriliri / licia / lib / pack.js View on Github external
each(comments, comment => {
        comment = trim(comment);
        if (startWith(comment, 'typescript')) {
            tsDefinition = comment.replace(/^typescript/, '');
            tsDefinition = outdentOneSpace(tsDefinition);
            tsDefinition = tsDefinition.replace(/export declare/g, 'declare');
            tsDefinition += '\n\nexport = ' + modName;
        }
    });