Skip to content

Commit

Permalink
add missing src/string-content-entry.mjs from template
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jun 20, 2024
1 parent c371701 commit 65b7ac3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/string-content-entry.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { StringContentEntryMixin } from "./string-content-entry-mixin.mjs";
import { ContentEntry } from "./content-entry.mjs";

/**
* Content entries where a string is the primary data representation.
*
* @param {string} name
* @param {string} value
*
* @property {string} name
* @property {string} string
*/
export class StringContentEntry extends StringContentEntryMixin(ContentEntry) {


// @ts-ignore
/** @type {string} */ string;

/**
* Content entries where a string is the primary data representation.
*
* @param {string} name
* @param {string} value
*
* @property {string} name
* @property {string} string
*/
constructor(name, value) {
// @ts-ignore
super(name);
this.string = value;
}

/**
*
* @returns {boolean} true if string length is zero
*/
get isEmpty() {
return this.string.length === 0;
}
}

0 comments on commit 65b7ac3

Please sign in to comment.