Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textom

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textom - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0-rc.1

56

index.js

@@ -44,2 +44,3 @@ 'use strict';

WORD_NODE,
SYMBOL_NODE,
PUNCTUATION_NODE,

@@ -54,2 +55,3 @@ WHITE_SPACE_NODE,

WORD_NODE = 'WordNode';
SYMBOL_NODE = 'SymbolNode';
PUNCTUATION_NODE = 'PunctuationNode';

@@ -1514,2 +1516,3 @@ WHITE_SPACE_NODE = 'WhiteSpaceNode';

WORD_NODE,
SYMBOL_NODE,
PUNCTUATION_NODE,

@@ -1551,2 +1554,3 @@ WHITE_SPACE_NODE,

TEXT_NODE,
SYMBOL_NODE,
PUNCTUATION_NODE

@@ -1562,6 +1566,6 @@ ];

/**
* Define `PunctuationNode`.
* Define `SymbolNode`.
*/
function PunctuationNode() {
function SymbolNode() {
Element.apply(this, arguments);

@@ -1571,3 +1575,3 @@ }

/**
* The type of an instance of PunctuationNode.
* The type of an instance of SymbolNode.
*

@@ -1578,3 +1582,3 @@ * @readonly

PunctuationNode.prototype.type = PUNCTUATION_NODE;
SymbolNode.prototype.type = SYMBOL_NODE;

@@ -1587,3 +1591,3 @@ /**

PunctuationNode.prototype.allowedChildTypes = [
SymbolNode.prototype.allowedChildTypes = [
TEXT_NODE

@@ -1593,17 +1597,17 @@ ];

/**
* Inherit from `Text.prototype`.
* Inherit from `SymbolNode.prototype`.
*/
Element.isImplementedBy(PunctuationNode);
Element.isImplementedBy(SymbolNode);
/**
* Expose `WhiteSpaceNode`.
* Define `PunctuationNode`.
*/
function WhiteSpaceNode() {
PunctuationNode.apply(this, arguments);
function PunctuationNode() {
SymbolNode.apply(this, arguments);
}
/**
* The type of an instance of WhiteSpaceNode.
* The type of an instance of PunctuationNode.
*

@@ -1614,19 +1618,32 @@ * @readonly

WhiteSpaceNode.prototype.type = WHITE_SPACE_NODE;
PunctuationNode.prototype.type = PUNCTUATION_NODE;
/**
* Define allowed children.
* Inherit from `SymbolNode.prototype`.
*/
SymbolNode.isImplementedBy(PunctuationNode);
/**
* Expose `WhiteSpaceNode`.
*/
function WhiteSpaceNode() {
SymbolNode.apply(this, arguments);
}
/**
* The type of an instance of WhiteSpaceNode.
*
* @readonly
* @static
*/
WhiteSpaceNode.prototype.allowedChildTypes = [
TEXT_NODE
];
WhiteSpaceNode.prototype.type = WHITE_SPACE_NODE;
/**
* Inherit from `Text.prototype`.
* Inherit from `SymbolNode.prototype`.
*/
PunctuationNode.isImplementedBy(WhiteSpaceNode);
SymbolNode.isImplementedBy(WhiteSpaceNode);

@@ -1719,2 +1736,3 @@ /**

TextOM.WORD_NODE = WORD_NODE;
TextOM.SYMBOL_NODE = SYMBOL_NODE;
TextOM.PUNCTUATION_NODE = PUNCTUATION_NODE;

@@ -1733,2 +1751,3 @@ TextOM.WHITE_SPACE_NODE = WHITE_SPACE_NODE;

nodePrototype.WORD_NODE = WORD_NODE;
nodePrototype.SYMBOL_NODE = SYMBOL_NODE;
nodePrototype.PUNCTUATION_NODE = PUNCTUATION_NODE;

@@ -1752,2 +1771,3 @@ nodePrototype.WHITE_SPACE_NODE = WHITE_SPACE_NODE;

TextOM.WordNode = WordNode;
TextOM.SymbolNode = SymbolNode;
TextOM.PunctuationNode = PunctuationNode;

@@ -1754,0 +1774,0 @@ TextOM.WhiteSpaceNode = WhiteSpaceNode;

{
"name": "textom",
"version": "0.2.1",
"version": "0.3.0-rc.1",
"description": "Object model for natural languages",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -71,6 +71,6 @@ # TextOM [![Build Status](https://travis-ci.org/wooorm/textom.svg?branch=master)](https://travis-ci.org/wooorm/textom) [![Coverage Status](https://img.shields.io/coveralls/wooorm/textom.svg)](https://coveralls.io/r/wooorm/textom?branch=master)

/* Add words, punctuation, and white space. */
/* Add words, symbols, punctuation, and white space. */
var dogs = sentence.append(new TextOM.WordNode()),
space0 = sentence.append(new TextOM.WhiteSpaceNode()),
ampersand = sentence.append(new TextOM.PunctuationNode()),
ampersand = sentence.append(new TextOM.SymbolNode()),
space1 = sentence.append(new TextOM.WhiteSpaceNode()),

@@ -198,2 +198,6 @@ cats = sentence.append(new TextOM.WordNode()),

##### TextOM\.Node#SYMBOL_NODE
Identifier for [SymbolNode](#textomsymbolnode-nlcstsymbolnode)s.
##### TextOM\.Node#PUNCTUATION_NODE

@@ -521,6 +525,14 @@

#### TextOM.PunctuationNode() [[NLCST:PunctuationNode](https://github.com/wooorm/nlcst#punctuationnode)]
#### TextOM.SymbolNode() [[NLCST:SymbolNode](https://github.com/wooorm/nlcst#symbolnode)]
Constructor ([Element](#textomelement)).
##### TextOM\.SymbolNode#type
Identifier for [SymbolNode](#textomsymbolnode-nlcstsymbolnode)s.
#### TextOM.PunctuationNode() [[NLCST:PunctuationNode](https://github.com/wooorm/nlcst#punctuationnode)]
Constructor ([SymbolNode](#textomsymbolnode-nlcstsymbolnode)).
##### TextOM\.PunctuationNode#type

@@ -532,3 +544,3 @@

Constructor ([PunctuationNode](#textompunctuationnode-nlcstpunctuationnode)).
Constructor ([SymbolNode](#textomsymbolnode-nlcstsymbolnode)).

@@ -576,2 +588,3 @@ ##### TextOM\.WhiteSpaceNode#type

const string WORD_NODE = "WordNode"
const string SYMBOL_NODE = "SymbolNode"
const string PUNCTUATION_NODE = "PunctuationNode"

@@ -668,6 +681,12 @@ const string WHITE_SPACE_NODE = "WhiteSpaceNode"

[Constructor]
interface SymbolNode {
readonly attribute string type = "SymbolNode";
};
SymbolNode implements Element;
[Constructor]
interface PunctuationNode {
readonly attribute string type = "PunctuationNode";
};
PunctuationNode implements Element;
PunctuationNode implements SymbolNode;

@@ -678,3 +697,3 @@ [Constructor]

};
WhiteSpaceNode implements PunctuationNode;
WhiteSpaceNode implements SymbolNode;

@@ -681,0 +700,0 @@ [Constructor(optional String value = "")]

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc