UNPKG

@textlint/kernel

Version:
15 lines 644 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPluginParsedObject = void 0; const hasOwnProperty = Object.prototype.hasOwnProperty; /** * textlint plugin can return TxtNode or { text: string; ast: TxtNode } * Return true if it the `o` is { text: string; ast: TxtNode } that is called ParsedObject. * https://github.com/textlint/textlint/pull/650 * @param o */ function isPluginParsedObject(o) { return typeof o === "object" && hasOwnProperty.call(o, "text") && hasOwnProperty.call(o, "ast"); } exports.isPluginParsedObject = isPluginParsedObject; //# sourceMappingURL=isPluginParsedObject.js.map