dshaw / checksum Goto Github PK
View Code? Open in Web Editor NEWChecksum utility for node.
Checksum utility for node.
Currenlty default encoding hex is being used. Enable the user to pass the encoding in options
It would be useful to have built in support for promises. I am thinking of an approach were you return a promise if no callback it provided, for the checksumFile() function?
This is more a nice-to-have at this point.
Packaging the CLI seperately will reduce the size of the main package by removing the CLI's source and other dependencies that are used only in the CLI.
Hello, Dan Shaw!
What is the difference between PayPal Orders API and Payments API from Checkout-Java-SDK?
Which one to use if I want to use authentications?
It is seems that Orders API not allows doing void of authorization. It feels like Order API is for use cases where you want to capture instantly and Payments API is for use cases when you want to use authorization, but it's not clear for me yet, am I right?
Orders API
https://developer.paypal.com/docs/api/orders/v2/
Payments API
https://developer.paypal.com/docs/api/payments/v2/
There is something not right in the readme:
var checksum = require('checksum')
, cs = checksum('dshaw')
if (cs === '9b8cebc0421241d087f6ab7e815285af803de7e7') {
console.log('yay')
}
checksum.file('dshaw.txt', function (err, sum) {
if (cs === '9b8cebc0421241d087f6ab7e815285af803de7e7') {
console.log('yay yay')
}
})
The last example should be: (the if cs should be if sum)
var checksum = require('checksum')
, cs = checksum('dshaw')
if (cs === '9b8cebc0421241d087f6ab7e815285af803de7e7') {
console.log('yay')
}
checksum.file('dshaw.txt', function (err, sum) {
if (sum === '9b8cebc0421241d087f6ab7e815285af803de7e7') {
console.log('yay yay')
}
})
Just a small copy paste error.
Thanks
Under node 0.10.1 - 0.10.3, checksum fails. Since travis-ci is currently running v0.10.2, that also flags the project as failing tests too. :-(
not ok test/checksum.test.js ............................ 0/2
Command: "node" "checksum.test.js"
TAP version 13
not ok 1 TypeError: Cannot set property 'decoder' of undefined
---
type: TypeError
message: Cannot set property 'decoder' of undefined
code: non_object_property_store
errno: ~
file: _stream_readable.js
line: 171
column: 31
stack:
- Hash.Readable.setEncoding (_stream_readable.js:171:31)
- checksum (/Users/dshaw/Dropbox/code/checksum/checksum.js:39:10)
- Test.<anonymous> (/Users/dshaw/Dropbox/code/checksum/test/checksum.test.js:8:11)
- Test.EventEmitter.emit (events.js:117:20)
- Test.emit (/Users/dshaw/Dropbox/code/checksum/node_modules/tap/lib/tap-test.js:103:8)
- GlobalHarness.Harness.process (/Users/dshaw/Dropbox/code/checksum/node_modules/tap/lib/tap-harness.js:86:13)
- process._tickCallback (node.js:415:13)
- Function.Module.runMain (module.js:499:11)
- startup (node.js:119:16)
- node.js:901:3
thrown: true
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.