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.3.0-rc.1 to 0.3.0-rc.2

14

index.js

@@ -1566,3 +1566,3 @@ 'use strict';

function SymbolNode() {
Element.apply(this, arguments);
Text.apply(this, arguments);
}

@@ -1580,16 +1580,6 @@

/**
* Define allowed children.
*
* @readonly
*/
SymbolNode.prototype.allowedChildTypes = [
TEXT_NODE
];
/**
* Inherit from `SymbolNode.prototype`.
*/
Element.isImplementedBy(SymbolNode);
Text.isImplementedBy(SymbolNode);

@@ -1596,0 +1586,0 @@ /**

2

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

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

@@ -73,15 +73,11 @@ # 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)

var dogs = sentence.append(new TextOM.WordNode()),
space0 = sentence.append(new TextOM.WhiteSpaceNode()),
ampersand = sentence.append(new TextOM.SymbolNode()),
space1 = sentence.append(new TextOM.WhiteSpaceNode()),
space0 = sentence.append(new TextOM.WhiteSpaceNode(' ')),
ampersand = sentence.append(new TextOM.SymbolNode('&')),
space1 = sentence.append(new TextOM.WhiteSpaceNode(' ')),
cats = sentence.append(new TextOM.WordNode()),
fullStop = sentence.append(new TextOM.PunctuationNode());
fullStop = sentence.append(new TextOM.PunctuationNode('.'));
/* Add content. */
/* Add words. */
var dogsText = dogs.append(new TextOM.TextNode('Dogs')),
space0Text = space0.append(new TextOM.TextNode(' ')),
ampersandText = ampersand.append(new TextOM.TextNode('&')),
space1Text = space1.append(new TextOM.TextNode(' ')),
catsText = cats.append(new TextOM.TextNode('cats')),
fullStopText = fullStop.append(new TextOM.TextNode('.'));
catsText = cats.append(new TextOM.TextNode('cats'));

@@ -155,4 +151,5 @@ /* Check root's content. */

```js
root.on('someeventnameinside', function () {
this; // dogs
root.on('someeventnameinside', function (context) {
this; // root
context; // dogsText
});

@@ -299,4 +296,4 @@

sentence.item(0); // dogs
sentence.item(6); // fullStop
sentence.item(7); // null
sentence.item(5); // fullStop
sentence.item(6); // null
```

@@ -357,3 +354,3 @@

dogs.prev; // null
space1.prev; // dogs
space0.prev; // dogs
```

@@ -386,3 +383,3 @@

cats.next; // null
cats.before(dogs);
cats.after(dogs);
cats.next; // dogs

@@ -448,4 +445,4 @@ ```

dogsText.toString(); // "Dogs"
space1Text.toString(); // " "
fullStopText.toString(); // "."
space1.toString(); // " "
fullStop.toString(); // "."
```

@@ -531,3 +528,3 @@

Constructor ([Element](#textomelement)).
Constructor ([Text](#textomtextvalue-nlcsttext)).

@@ -682,9 +679,9 @@ ##### TextOM\.SymbolNode#type

[Constructor]
[Constructor(optional String value = "")]
interface SymbolNode {
readonly attribute string type = "SymbolNode";
};
SymbolNode implements Element;
SymbolNode implements Text;
[Constructor]
[Constructor(optional String value = "")]
interface PunctuationNode {

@@ -695,3 +692,3 @@ readonly attribute string type = "PunctuationNode";

[Constructor]
[Constructor(optional String value = "")]
interface WhiteSpaceNode {

@@ -698,0 +695,0 @@ readonly attribute string type = "WhiteSpaceNode";

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