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

airbitz-io-node-js

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airbitz-io-node-js - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

5

changelog.md
# airbitz-io-node-js
## 0.3.0
* Add a `makeNodeContext` function
* Switch to a non-broken version of `disklet`
## 0.2.0

@@ -4,0 +9,0 @@

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

var airbitzCoreJs = require('airbitz-core-js');
var crypto = _interopDefault(require('crypto'));

@@ -16,2 +17,7 @@ var disklet = require('disklet');

/**
* Creates the io resources needed to run the Airbitz core on node.js.
*
* @param {string} path Location where data should be written to disk.
*/
function makeNodeIo (path) {

@@ -26,3 +32,18 @@ return {

/**
* Creates an Airbitz context for use on node.js.
*
* @param {{ path?: string }} opts Options for creating the context,
* including the `path` where data should be written to disk.
*/
function makeNodeContext (opts) {
if ( opts === void 0 ) opts = {};
var path = opts.path; if ( path === void 0 ) path = './airbitz';
opts.io = makeNodeIo(path);
return airbitzCoreJs.makeContext(opts)
}
exports.makeNodeIo = makeNodeIo;
exports.makeNodeContext = makeNodeContext;
//# sourceMappingURL=airbitz-io-node-js.cjs.js.map

22

lib/airbitz-io-node-js.es6.js

@@ -0,1 +1,2 @@

import { makeContext } from 'airbitz-core-js';
import crypto from 'crypto';

@@ -9,2 +10,7 @@ import { makeNodeFolder } from 'disklet';

/**
* Creates the io resources needed to run the Airbitz core on node.js.
*
* @param {string} path Location where data should be written to disk.
*/
function makeNodeIo (path) {

@@ -19,3 +25,17 @@ return {

export { makeNodeIo };
/**
* Creates an Airbitz context for use on node.js.
*
* @param {{ path?: string }} opts Options for creating the context,
* including the `path` where data should be written to disk.
*/
function makeNodeContext (opts) {
if ( opts === void 0 ) opts = {};
var path = opts.path; if ( path === void 0 ) path = './airbitz';
opts.io = makeNodeIo(path);
return makeContext(opts)
}
export { makeNodeIo, makeNodeContext };
//# sourceMappingURL=airbitz-io-node-js.es6.js.map

35

package.json
{
"name": "airbitz-io-node-js",
"version": "0.2.0",
"version": "0.3.0",
"description": "IO dependencies for running airbitz-core-js on node.js",
"url": "https://airbitz.co",
"homepage": "https://airbitz.co",
"license": "SEE LICENSE IN LICENSE",
"author": "Airbitz, Inc.",

@@ -10,18 +11,7 @@ "contributors": [

],
"license": "SEE LICENSE IN LICENSE",
"main": "lib/airbitz-io-node-js.cjs.js",
"module": "lib/airbitz-io-node-js.es6.js",
"dependencies": {
"disklet": "^0.1.1",
"node-fetch": "^1.6.3"
},
"devDependencies": {
"husky": "^0.13.3",
"rollup": "^0.41.6",
"rollup-plugin-buble": "^0.15.0",
"standard": "^10.0.1"
},
"files": [
"lib/*"
],
"main": "lib/airbitz-io-node-js.cjs.js",
"module": "lib/airbitz-io-node-js.es6.js",
"repository": {

@@ -33,6 +23,19 @@ "type": "git",

"build": "rollup -c",
"precommit": "npm run lint",
"lint": "standard '*.js' 'src/**/*.js'",
"precommit": "npm run lint",
"prepublish": "npm run lint && npm run build"
},
"dependencies": {
"disklet": "^0.1.2",
"node-fetch": "^1.6.3"
},
"devDependencies": {
"husky": "^0.13.3",
"rollup": "^0.43.0",
"rollup-plugin-buble": "^0.15.0",
"standard": "^10.0.1"
},
"peerDependencies": {
"airbitz-core-js": "^0.3.1"
}
}

@@ -7,13 +7,14 @@ # Airbitz Node.js IO depdendencies

```js
import { makeContext } from 'airbitz-core-js'
import { makeNodeIo } from 'airbitz-io-node-js'
```javascript
import { makeNodeContext } from 'airbitz-io-node-js'
const context = makeContext({
const context = makeNodeContext({
apiKey: '...',
appId: '...',
io: makeNodeIo('/path/for/saving/data')
path: '/path/for/saving/data'
})
```
The Airbitz core will save all login data under the provided path.
The Airbitz core will save all login data under the provided `path` option.
There is also a standalone `makeNodeIo(path: string)` function if you would like to inspect or modify the `io` object before passing it to the core's `makeContext` function.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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