{"size": 588, "ext": "js", "max_stars_repo_path": "lib/document/element/Paragraph.js", "max_stars_repo_name": "Radiergummi/phoenix", "max_stars_repo_stars_event_min_datetime": "2017-11-24T11:28:10.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-25T15:58:14.000Z", "max_issues_repo_path": "lib/document/element/Paragraph.js", "max_issues_repo_name": "Radiergummi/phoenix", "max_issues_repo_issues_event_min_datetime": "2017-11-26T14:58:45.000Z", "max_issues_repo_issues_event_max_datetime": "2018-01-06T20:22:58.000Z", "max_forks_repo_path": "lib/document/element/Paragraph.js", "max_forks_repo_name": "Radiergummi/phoenix", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 9, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 16.3333333333, "max_line_length": 46, "alphanum_fraction": 0.5578231293}
'use strict';

/*
 global module,
 require
 */
const Element = require( './Element' ),
      Node    = require( '../Node' ),
      Text    = require( './Text' );

/**
 * Provides a paragraph element
 *
 * @class
 * @extends Element
 * @extends Node
 */
class Paragraph extends Element {
  constructor ( content, ...args ) {
    super( {}, ...args );

    if ( typeof content === 'string' ) {
      this.appendChild( new Text( content ) );
    }

    if ( content instanceof Node ) {
      this.appendChild( content );
    }
  }
}

/**
 * @type {Paragraph}
 */
module.exports = Paragraph;
