How to use the catharsis.stringify function in catharsis

To help you get started, we’ve selected a few catharsis 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 melonjs / melonJS / tasks / jsdoc / lib / jsdoc / tag / type.js View on Github external
types.push('*');
            break;
        case TYPES.FunctionType:
            types.push('function');
            break;
        case TYPES.NameExpression:
            types.push(parsedType.name);
            break;
        case TYPES.NullLiteral:
            types.push('null');
            break;
        case TYPES.RecordType:
            types.push('Object');
            break;
        case TYPES.TypeApplication:
            types.push( catharsis.stringify(parsedType) );
            break;
        case TYPES.TypeUnion:
            parsedType.elements.forEach(function(element) {
                types = types.concat( getTypeStrings(element) );
            });
            break;
        case TYPES.UndefinedLiteral:
            types.push('undefined');
            break;
        case TYPES.UnknownLiteral:
            types.push('?');
            break;
        default:
            // this shouldn't happen
            throw new Error( util.format('unrecognized type %s in parsed type: %j', parsedType.type,
                parsedType) );
github WASdev / lib.rtcomm.clientjs / build_resources / lib / jsdoc-master / lib / jsdoc / tag / type.js View on Github external
case TYPES.RecordType:
            types.push('Object');
            break;
        case TYPES.TypeApplication:
            // if this is the outermost type, we strip the modifiers; otherwise, we keep them
            if (isOutermostType) {
                applications = parsedType.applications.map(function(application) {
                    return catharsis.stringify(application);
                }).join(', ');
                typeString = util.format( '%s.<%s>', getTypeStrings(parsedType.expression),
                    applications );

                types.push(typeString);
            }
            else {
                types.push( catharsis.stringify(parsedType) );
            }
            break;
        case TYPES.TypeUnion:
            parsedType.elements.forEach(function(element) {
                types = types.concat( getTypeStrings(element) );
            });
            break;
        case TYPES.UndefinedLiteral:
            types.push('undefined');
            break;
        case TYPES.UnknownLiteral:
            types.push('?');
            break;
        default:
            // this shouldn't happen
            throw new Error( util.format('unrecognized type %s in parsed type: %j', parsedType.type,
github BladeRunnerJS / brjs / brjs-sdk / build-resources / includes / sdk / jsdoc-toolkit-resources / jsdoc-toolkit / lib / jsdoc / util / templateHelper.js View on Github external
function stringifyType(parsedType, cssClass, linkMap) {
    return require('catharsis').stringify(parsedType, {
        cssClass: cssClass,
        htmlSafe: true,
        links: linkMap
    });
}
github BladeRunnerJS / brjs / brjs-sdk / sdk / jsdoc-toolkit-resources / jsdoc-toolkit / lib / jsdoc / tag / type.js View on Github external
applications = parsedType.applications.map(function(application) {
                    return catharsis.stringify(application);
                }).join(', ');
                typeString = util.format( '%s.<%s>', getTypeStrings(parsedType.expression),
github melonjs / melonJS / tasks / jsdoc / lib / jsdoc / util / templateHelper.js View on Github external
function stringifyType(parsedType, cssClass, linkMap) {
    return require('catharsis').stringify(parsedType, {
        cssClass: cssClass,
        htmlSafe: true,
        links: linkMap
    });
}
github BladeRunnerJS / brjs / brjs-sdk / build-resources / includes / sdk / jsdoc-toolkit-resources / jsdoc-toolkit / lib / jsdoc / util / templateHelper.js View on Github external
function stringifyType(parsedType, cssClass, linkMap) {
    return require('catharsis').stringify(parsedType, {
        cssClass: cssClass,
        htmlSafe: true,
        links: linkMap
    });
}
github jsdoc / jsdoc / packages / jsdoc / lib / jsdoc / util / templateHelper.js View on Github external
function stringifyType(parsedType, cssClass, stringifyLinkMap) {
    return require('catharsis').stringify(parsedType, {
        cssClass: cssClass,
        htmlSafe: true,
        links: stringifyLinkMap
    });
}

catharsis

A JavaScript parser for Google Closure Compiler and JSDoc type expressions.

MIT
Latest version published 4 years ago

Package Health Score

72 / 100
Full package analysis

Similar packages