serializeapp
Advanced tools
Comparing version 2.2.0 to 3.0.0
/** | ||
* Node Modules | ||
*/ | ||
var Promise = require('promise'); | ||
/** | ||
* Library modules | ||
@@ -67,5 +62,4 @@ */ | ||
}) | ||
.nodeify(callback); | ||
}; | ||
module.exports = serializeApp; |
{ | ||
"name": "serializeapp", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "Serializes a Qlik Sense App into JSON", | ||
@@ -29,5 +29,3 @@ "main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"promise": "^7.0.4" | ||
} | ||
"dependencies": {} | ||
} |
@@ -1,15 +0,18 @@ | ||
##serializeapp | ||
## serializeapp | ||
serializeapp is a node utility module to serialize a Qlik Sense app into a JSON object. | ||
Pass it a [qsocks](https://github.com/mindspank/qsocks) app class and it returns the JSON representation of that app. | ||
Pass it a [qsocks](https://github.com/mindspank/qsocks) or a [enigma.js](https://github.com/qlik-oss/enigma.js) app object and it returns a promise containing the JSON representation of that app. | ||
Returns a promise as standard but also accepts classical node style callbacks. | ||
Verified to work in the browser using browserify or webpack. | ||
##installing | ||
## installing | ||
``` | ||
npm install serializeapp | ||
``` | ||
or | ||
``` | ||
yarn add serializeapp | ||
``` | ||
##examples | ||
## examples | ||
@@ -22,17 +25,26 @@ Connect to Qlik Sense Desktop, open a app and pass that into serializeapp. | ||
qsocks.Connect().then(function(global) { | ||
global.openDoc('Executive Dashboard.qvf') | ||
.then(function(app) { | ||
return serializeapp(app); | ||
}) | ||
.then(function(data) { | ||
console.log(data) // --> A JSON Object describing the app. | ||
}) | ||
qsocks.Connect() | ||
.then(global => global.openDoc('Executive Dashboard.qvf')) | ||
.then(app => serializeapp(app)) | ||
.then(result => console.log(result)) | ||
``` | ||
```javascript | ||
const serializeapp = require('serializeapp') | ||
const enigma = require('enigma.js') | ||
const WebSocket = require('ws') | ||
enigma.getService('qix', { | ||
schema: require(`./node_modules/enigma.js/schemas/qix/3.2/schema.json`), | ||
session: { | ||
host: 'localhost', | ||
port: 4848, | ||
secure: false | ||
}, | ||
createSocket: (url) => new WebSocket(url) | ||
}) | ||
.then(qix => qix.global.openDoc('Executive Dashboard.qvf')) | ||
.then(app => serializeapp(app)) | ||
.then(result => console.log(result)) | ||
``` | ||
##Returns | ||
## Returns | ||
<big><pre> | ||
@@ -39,0 +51,0 @@ { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16601
0
65
241
- Removedpromise@^7.0.4
- Removedasap@2.0.6(transitive)
- Removedpromise@7.3.1(transitive)