UNPKG

@emdaer/core

Version:
91 lines (87 loc) β€’ 5.89 kB
<!-- This file was generated by emdaer Its template can be found at .emdaer/README.emdaer.md --> <!-- emdaerHash:206f4c5d790ab1529227c96dd8a363ef --> <h1 id="-emdaer-core-travis-documented-with-emdaer-maintained-with-lerna">@emdaer/core Β· <a href="https://travis-ci.org/emdaer/emdaer/"><img src="https://img.shields.io/travis/emdaer/emdaer.svg?style=flat-square" alt="Travis"></a> <a href="https://github.com/emdaer/emdaer"><img src="https://img.shields.io/badge/πŸ““-documented%20with%20emdaer-F06632.svg?style=flat-square" alt="Documented with emdaer"></a> <a href="https://lernajs.io/"><img src="https://img.shields.io/badge/πŸ‰-maintained%20with%20lerna-cc00ff.svg?style=flat-square" alt="Maintained with lerna"></a></h1> <p>emdaer core</p> <h2 id="usage">Usage</h2> <p>emdaer core is the core <a href="https://github.com/emdaer/emdaer/">emdaer</a> package – see the <a href="https://github.com/emdaer/emdaer/">emdaer monorepo</a> for more information</p> <h2 id="documentation">Documentation</h2> <!-- Generated by documentation.js. Update this documentation by updating the source code. --> <h2 id="executeplugins">executePlugins</h2> <p>Finds and executes plugins</p> <p><strong>Parameters</strong></p> <ul> <li><code>content</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> </ul> <p>Returns <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</strong> </p> <h2 id="executeplugin">executePlugin</h2> <p>Executes a plugin to generate content</p> <p><strong>Parameters</strong></p> <ul> <li><code>$0</code> <strong>any</strong> <ul> <li><code>$0.0</code> </li> <li><code>$0.1</code> </li> </ul> </li> </ul> <p>Returns <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</strong> </p> <h2 id="resolveplugin">resolvePlugin</h2> <p>Loads a provided plugin</p> <p><strong>Parameters</strong></p> <ul> <li><code>pluginName</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> </ul> <p>Returns <strong>Plugin</strong> </p> <h2 id="emdaererror">EmdaerError</h2> <p><strong>Extends Error</strong></p> <p><strong>Parameters</strong></p> <ul> <li><code>code</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> <li><code>args</code> <strong>…any</strong> </li> </ul> <h2 id="applytransforms">applyTransforms</h2> <p>Applies transforms to generated content</p> <p><strong>Parameters</strong></p> <ul> <li><code>content</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> <li><code>transforms</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</strong> </li> </ul> <p>Returns <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</strong> </p> <h2 id="applytransform">applyTransform</h2> <p>Applies a transform to generated content</p> <p><strong>Parameters</strong></p> <ul> <li><code>content</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> <li><code>$1</code> <strong>any</strong> <ul> <li><code>$1.0</code> </li> <li><code>$1.1</code> </li> </ul> </li> <li><code>comment</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> </ul> <p>Returns <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</strong> </p> <h2 id="resolvetransform">resolveTransform</h2> <p>Loads a provided transform</p> <p><strong>Parameters</strong></p> <ul> <li><code>transformName</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> </ul> <p>Returns <strong>Transform</strong> </p> <h2 id="identifytransforms">identifyTransforms</h2> <p>Identifies transforms</p> <p><strong>Parameters</strong></p> <ul> <li><code>content</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> </ul> <p>Returns <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;&gt;</strong> </p> <h2 id="fixcodefences">fixCodeFences</h2> <p>Applies transforms to generated content</p> <p><strong>Parameters</strong></p> <ul> <li><code>content</code> <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </li> </ul> <p>Returns <strong><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></strong> </p>