diff --git a/README.md b/README.md index 2194c328e..d65e9f368 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Neo4j Driver 1.6 for Javascript +# Neo4j Driver 1.6 for JavaScript A database driver for Neo4j 3.0.0+. @@ -265,7 +265,7 @@ While there is no need to grab admin right if you are running tests against an e ## A note on numbers and the Integer type The Neo4j type system includes 64-bit integer values. -However, Javascript can only safely represent integers between `-(2``53`` - 1)` and `(2``53`` - 1)`. +However, JavaScript can only safely represent integers between `-(2``53`` - 1)` and `(2``53`` - 1)`. In order to support the full Neo4j type system, the driver will not automatically convert to javascript integers. Any time the driver receives an integer value from Neo4j, it will be represented with an internal integer type by the driver. diff --git a/docs/README.md b/docs/README.md index da41a1bcb..1f5909e19 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# Documentation for Neo4j Bolt Driver for Javascript +# Documentation for Neo4j Bolt Driver for JavaScript The docs are generated with [esdoc](https://github.com/esdoc/esdoc), which is added as a devDependency to this project. diff --git a/esdoc.json b/esdoc.json index a87adc38c..8180c30a3 100644 --- a/esdoc.json +++ b/esdoc.json @@ -38,7 +38,7 @@ "enable": true }, "brand": { - "title": "Neo4j Bolt Driver 1.6 for Javascript", + "title": "Neo4j Bolt Driver 1.6 for JavaScript", "repository": "https://github.com/neo4j/neo4j-javascript-driver" } } diff --git a/src/v1/integer.js b/src/v1/integer.js index 29f6468b7..5668a5bf8 100644 --- a/src/v1/integer.js +++ b/src/v1/integer.js @@ -57,9 +57,9 @@ class Integer { // The internal representation of an Integer is the two given signed, 32-bit values. // We use 32-bit pieces because these are the size of integers on which - // Javascript performs bit-operations. For operations like addition and + // JavaScript performs bit-operations. For operations like addition and // multiplication, we split each number into 16 bit pieces, which can easily be - // multiplied within Javascript's floating-point representation without overflow + // multiplied within JavaScript's floating-point representation without overflow // or change in sign. // // In the algorithms below, we frequently reduce the negative case to the diff --git a/src/v1/internal/buf.js b/src/v1/internal/buf.js index d9356eea5..cc4106a18 100644 --- a/src/v1/internal/buf.js +++ b/src/v1/internal/buf.js @@ -314,14 +314,14 @@ class BaseBuffer } /** - * Get remaning + * Get remaining */ remaining () { return this.length - this.position; } /** - * Has remaning + * Has remaining */ hasRemaining () { return this.remaining() > 0; diff --git a/src/v1/internal/chunking.js b/src/v1/internal/chunking.js index ff88fa047..0c328f3fb 100644 --- a/src/v1/internal/chunking.js +++ b/src/v1/internal/chunking.js @@ -172,7 +172,7 @@ class Dechunker { // no-op } - /** Called when a complete chunk header has been recieved */ + /** Called when a complete chunk header has been received */ _onHeader(header) { if (header == 0) { // Message boundary diff --git a/src/v1/internal/connector.js b/src/v1/internal/connector.js index eafbeebb3..522a5edf9 100644 --- a/src/v1/internal/connector.js +++ b/src/v1/internal/connector.js @@ -80,7 +80,7 @@ let NO_OP_OBSERVER = { }; /** - * A connection manages sending and recieving messages over a channel. A + * A connection manages sending and receiving messages over a channel. A * connector is very closely tied to the Bolt protocol, it implements the * same message structure with very little frills. This means Connectors are * naturally tied to a specific version of the protocol, and we expect @@ -103,7 +103,7 @@ class Connection { constructor(channel, url, disableLosslessIntegers = false) { /** * An ordered queue of observers, each exchange response (zero or more - * RECORD messages followed by a SUCCESS message) we recieve will be routed + * RECORD messages followed by a SUCCESS message) we receive will be routed * to the next pending observer. */ this.url = url; diff --git a/src/v1/internal/least-connected-load-balancing-strategy.js b/src/v1/internal/least-connected-load-balancing-strategy.js index 11f259cf9..9d682fbc0 100644 --- a/src/v1/internal/least-connected-load-balancing-strategy.js +++ b/src/v1/internal/least-connected-load-balancing-strategy.js @@ -54,7 +54,7 @@ export default class LeastConnectedLoadBalancingStrategy extends LoadBalancingSt return null; } - // choose start index for iteration in round-rodin fashion + // choose start index for iteration in round-robin fashion const startIndex = roundRobinIndex.next(length); let index = startIndex; diff --git a/src/v1/result-summary.js b/src/v1/result-summary.js index fbd149e0b..39a94263e 100644 --- a/src/v1/result-summary.js +++ b/src/v1/result-summary.js @@ -271,14 +271,14 @@ class StatementStatistics { } /** - * @return {Number} - Number of contraints added. + * @return {Number} - Number of constraints added. */ constraintsAdded() { return this._stats.constraintsAdded; } /** - * @return {Number} - Number of contraints removed. + * @return {Number} - Number of constraints removed. */ constraintsRemoved() { return this._stats.constraintsRemoved; diff --git a/test/resources/boltstub/unparseable_servers_get_servers.script b/test/resources/boltstub/unparsable_servers_get_servers.script similarity index 100% rename from test/resources/boltstub/unparseable_servers_get_servers.script rename to test/resources/boltstub/unparsable_servers_get_servers.script diff --git a/test/resources/boltstub/unparseable_ttl_get_servers.script b/test/resources/boltstub/unparsable_ttl_get_servers.script similarity index 100% rename from test/resources/boltstub/unparseable_ttl_get_servers.script rename to test/resources/boltstub/unparsable_ttl_get_servers.script diff --git a/test/resources/neo4j-wrapper.conf b/test/resources/neo4j-wrapper.conf index 81d4fa489..8a620decf 100644 --- a/test/resources/neo4j-wrapper.conf +++ b/test/resources/neo4j-wrapper.conf @@ -32,7 +32,7 @@ dbms.jvm.additional=-XX:+AlwaysPreTouch # Trust that non-static final fields are really final. # This allows more optimisations and improves overall performance. -# NOTE: Disable this if you use embedded mode, or have extensions or depencies that may use reflection or serialization +# NOTE: Disable this if you use embedded mode, or have extensions or dependencies that may use reflection or serialization # to change the value of final fields! dbms.jvm.additional=-XX:+UnlockExperimentalVMOptions dbms.jvm.additional=-XX:+TrustFinalNonStaticFields diff --git a/test/v1/driver.test.js b/test/v1/driver.test.js index d88091715..2e499bb1b 100644 --- a/test/v1/driver.test.js +++ b/test/v1/driver.test.js @@ -64,7 +64,7 @@ describe('driver', () => { it('should handle connection errors', done => { // Given - driver = neo4j.driver("bolt://localhoste", sharedNeo4j.authToken); + driver = neo4j.driver("bolt://local-host", sharedNeo4j.authToken); // Expect driver.onError = error => { diff --git a/test/v1/routing.driver.boltkit.test.js b/test/v1/routing.driver.boltkit.test.js index 92bc736db..19a30ae44 100644 --- a/test/v1/routing.driver.boltkit.test.js +++ b/test/v1/routing.driver.boltkit.test.js @@ -972,11 +972,11 @@ describe('routing driver with stub server', () => { }); it('should throw protocol error when multiple records', done => { - testForProtocolError('./test/resources/boltstub/unparseable_ttl_get_servers.script', done); + testForProtocolError('./test/resources/boltstub/unparsable_ttl_get_servers.script', done); }); it('should throw protocol error on unparsable record', done => { - testForProtocolError('./test/resources/boltstub/unparseable_servers_get_servers.script', done); + testForProtocolError('./test/resources/boltstub/unparsable_servers_get_servers.script', done); }); it('should throw protocol error when no routers', done => { @@ -1100,7 +1100,7 @@ describe('routing driver with stub server', () => { }); }); - it('should send initial bookmark wihtout access mode', done => { + it('should send initial bookmark without access mode', done => { testWriteSessionWithAccessModeAndBookmark(null, 'neo4j:bookmark:v1:tx42', done); }); diff --git a/test/v1/tck/steps/authsteps.js b/test/v1/tck/steps/authsteps.js index f1586d5a2..a8832916b 100644 --- a/test/v1/tck/steps/authsteps.js +++ b/test/v1/tck/steps/authsteps.js @@ -75,7 +75,7 @@ module.exports = function () { var expectedCode = 'Neo.ClientError.Security.Unauthorized'; if (message.indexOf(expectedStartOfMessage) != 0) { - throw new Error("Wrong error messsage. Expected: '" + expectedStartOfMessage + "'. Got: '" + message + "'"); + throw new Error("Wrong error message. Expected: '" + expectedStartOfMessage + "'. Got: '" + message + "'"); } if (code.indexOf(expectedCode) != 0) { diff --git a/test/v1/tck/steps/erroreportingsteps.js b/test/v1/tck/steps/erroreportingsteps.js index bca0e714c..eb58a5185 100644 --- a/test/v1/tck/steps/erroreportingsteps.js +++ b/test/v1/tck/steps/erroreportingsteps.js @@ -38,7 +38,7 @@ module.exports = function () { this.Then(/^it throws a `ClientException`$/, function (table) { var expected = table.rows()[0][0]; if (!this.error) { - throw new Error("Exepcted an error but got none.") + throw new Error("Expected an error but got none.") } if (this.error.message.indexOf(expected) != 0) { if (!(expected == "Unsupported URI scheme:" || expected == "Unable to connect to" )) diff --git a/test/v1/tck/steps/util.js b/test/v1/tck/steps/util.js index 1b824c988..c4535b04b 100644 --- a/test/v1/tck/steps/util.js +++ b/test/v1/tck/steps/util.js @@ -223,7 +223,7 @@ function printable(array) { function getType(val) { var labels = getLabels(val); if (labels.length > 1) { - throw new Error("Shuld be single type. Found many: " + labels) + throw new Error("Should be single type. Found many: " + labels) } if (labels.length === 0) { return [];