UNPKG

@ng-doc/builder

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

21 lines 796 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPlaygroundsExpression = getPlaygroundsExpression; const ts_morph_1 = require("ts-morph"); /** * Returns the playgrounds expression * @param objectLiteralExpression - The object literal expression of the page */ function getPlaygroundsExpression(objectLiteralExpression) { if (objectLiteralExpression) { const property = objectLiteralExpression.getProperty('playgrounds'); if (ts_morph_1.Node.isPropertyAssignment(property)) { const value = property.getInitializer(); if (ts_morph_1.Node.isObjectLiteralExpression(value)) { return value; } } } return undefined; } //# sourceMappingURL=get-playgrounds-expression.js.map