update references to swarmjs

This commit is contained in:
Iuri Matias 2018-09-06 15:19:11 -04:00
parent e9bb60a9f1
commit 2dcf851709
2 changed files with 6 additions and 6 deletions

View File

@ -9,10 +9,10 @@ This library can be used to upload/download files to Swarm via https://swarm-gat
## Library usage
```js
const swarmgw = require('swarmgw')(/* opts */)
const swarmjs = require('swarmjs')(/* opts */)
// This should output the hash: 931cc5a6bd57724ffd1adefc0ea6b4f0235497fca9e4f9ae4029476bcb51a8c6
swarmgw.put('Hello from swarmgw!', function (err, ret) {
swarmjs.put('Hello from swarmjs!', function (err, ret) {
if (err) {
console.log('Failed to upload: ' + err)
} else {
@ -20,8 +20,8 @@ swarmgw.put('Hello from swarmgw!', function (err, ret) {
}
})
// This should output the content: Hello from swarmgw!
swarmgw.get('bzz-raw://931cc5a6bd57724ffd1adefc0ea6b4f0235497fca9e4f9ae4029476bcb51a8c6', function (err, ret) {
// This should output the content: Hello from swarmjs!
swarmjs.get('bzz-raw://931cc5a6bd57724ffd1adefc0ea6b4f0235497fca9e4f9ae4029476bcb51a8c6', function (err, ret) {
if (err) {
abort('Failed to download: ' + err)
} else {
@ -36,7 +36,7 @@ The `opts` above is a map of options:
## CLI usage
It can also be used via the command line if installed globally (`npm install -g swarmgw`). To see the help: `swarmgw --help`.
It can also be used via the command line if installed globally (`npm install -g swarmjs`). To see the help: `swarmjs --help`.
## License

View File

@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"bin": {
"swarmgw": "./swarmgw"
"swarmjs": "./swarmjs"
},
"dependencies": {
"klaw": "^3.0.0",