-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use dignified.js #30
Merged
Merged
Use dignified.js #30
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,27 +2,34 @@ | |
"name": "ipfs-merkle-dag", | ||
"version": "0.3.0", | ||
"description": "A JavaScript implementations of the IPFS MerkleDAG implementations (protobufs)", | ||
"main": "./src/index.js", | ||
"main": "lib/index.js", | ||
"jsnext:main": "src/index.js", | ||
"scripts": { | ||
"test": "npm run test:node && npm run test:browser", | ||
"test:node": "mocha tests/index.js", | ||
"test:browser": "karma start --single-run=true karma.conf.js", | ||
"lint": "standard" | ||
"lint": "dignified-lint", | ||
"build": "dignified-build", | ||
"test": "dignified-test", | ||
"test:node": "dignified-test node", | ||
"test:browser": "dignified-test browser", | ||
"release": "dignified-release", | ||
"coverage": "dignified-coverage" | ||
}, | ||
"pre-commit": [ | ||
"lint", | ||
"test" | ||
], | ||
"author": "Vijayee Kulkaa <[email protected]>", | ||
"contributors": [ | ||
"David Dias <[email protected]>" | ||
"David Dias <[email protected]>", | ||
"Friedel Ziegelmayer <[email protected]>" | ||
], | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/vijayee/js-ipfs-merkle-dag.git" | ||
}, | ||
"dependencies": { | ||
"bs58": "^3.0.0", | ||
"detect-node": "^2.0.3", | ||
"ipfs-blocks": "^0.1.0", | ||
"is-ipfs": "^0.2.0", | ||
"multihashing": "^0.2.0", | ||
|
@@ -31,29 +38,15 @@ | |
}, | ||
"devDependencies": { | ||
"async": "^1.5.2", | ||
"brfs": "^1.4.3", | ||
"bs58": "^3.0.0", | ||
"buffer-loader": "0.0.1", | ||
"chai": "^3.5.0", | ||
"dignified.js": "^1.0.0", | ||
"fs-blob-store": "^5.2.1", | ||
"idb-plus-blob-store": "^1.0.0", | ||
"ipfs-repo": "^0.5.3", | ||
"json-loader": "^0.5.4", | ||
"karma": "^0.13.19", | ||
"karma-chrome-launcher": "^0.2.2", | ||
"karma-cli": "^0.1.2", | ||
"karma-firefox-launcher": "^0.1.7", | ||
"karma-mocha": "^0.2.1", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-spec-reporter": "0.0.24", | ||
"karma-webpack": "^1.7.0", | ||
"lodash": "^4.6.1", | ||
"mocha": "^2.4.5", | ||
"ncp": "^2.0.0", | ||
"pre-commit": "^1.1.2", | ||
"rimraf": "^2.5.0", | ||
"standard": "^6.0.8", | ||
"transform-loader": "^0.2.3", | ||
"webpack": "^2.0.7-beta" | ||
"rimraf": "^2.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use strict' | ||
|
||
var Block = require('ipfs-blocks').Block | ||
|
||
exports = module.exports = Batch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
'use strict' | ||
|
||
var multihashing = require('multihashing') | ||
var isNode = require('detect-node') | ||
|
||
exports = module.exports | ||
|
||
// Hash is the global IPFS hash function. uses multihash SHA2_256, 256 bits | ||
exports.hash = (data) => { return multihashing(data, 'sha2-256') } | ||
exports.isBrowser = () => { return !!global.window } | ||
exports.hash = (data) => multihashing(data, 'sha2-256') | ||
exports.isBrowser = () => !isNode | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one dependency to save 0 lines of code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one dependency to solve real world issues: ipfs-inactive/js-ipfs-http-client#154