residue
Advanced tools
Comparing version 2.3.3 to 2.3.4
# Change Log | ||
## [2.3.1] | ||
## [2.3.4] | ||
- Introduced native binding | ||
- Added `version()` | ||
- Added `version()` and `type()` | ||
@@ -7,0 +7,0 @@ ## [2.1.0] |
@@ -7,3 +7,8 @@ 'use strict'; | ||
} catch (e) { | ||
if (e.message.indexOf('Cannot find module \'residue-native\'') === -1) { | ||
// User is trying to use residue-native and getting error so we display | ||
// the error message | ||
console.log(e.message); | ||
} | ||
module.exports = require('./src/residue'); | ||
} |
{ | ||
"name": "residue", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"description": "Library to interact with residue server seamlessly.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,3 @@ ﷽ | ||
## Native API | ||
## Native Modules | ||
This library depends on following native modules, without them library will not work: | ||
@@ -65,2 +65,7 @@ | ||
// or | ||
// residue.loadConfiguration({ url: ... }) | ||
// or | ||
// residue.loadConfiguration('{ url: ... }') | ||
// ALTERNATIVELY | ||
@@ -91,2 +96,7 @@ residue.connect({ | ||
## Native Binding | ||
Residue Node.js also comes with native binding that uses [C++ client library](https://github.com/muflihun/residue-cpp) to manage connections and asyncronous requests. | ||
If you have installed [`residue-native`](https://www.npmjs.com/package/residue-native) package alongside `residue`, native binding will be used otherwise it will fallback to JS implementation. | ||
## Sample | ||
@@ -93,0 +103,0 @@ You can check out [sample client apps](https://github.com/muflihun/residue-node/blob/master/samples) for practical use of this package. |
@@ -12,2 +12,3 @@ // | ||
// https://github.com/muflihun/residue-node | ||
// https://github.com/muflihun/residue-node-native | ||
// | ||
@@ -75,2 +76,3 @@ | ||
exports.version = residue_native.version; | ||
exports.type = () = 'native'; | ||
exports.loadConfiguration = loadConfiguration; | ||
@@ -77,0 +79,0 @@ exports.connect = connect; |
@@ -627,2 +627,3 @@ // | ||
exports.version = () => require('./../package.json').version; | ||
exports.type = () => 'js'; | ||
exports.loadConfiguration = loadConfiguration; | ||
@@ -629,0 +630,0 @@ exports.connect = connect; |
36578
691
123