spell 0.1.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +35 -136
  2. package/package.json +24 -21
  3. package/.gitignore +0 -4
  4. package/.travis.yml +0 -6
  5. package/spell.js +0 -338
  6. package/test/css/mocha.css +0 -110
  7. package/test/index.html +0 -34
  8. package/test/lib/JSONStream/.gitignore +0 -3
  9. package/test/lib/JSONStream/bench.js +0 -35
  10. package/test/lib/JSONStream/examples/all_docs.js +0 -13
  11. package/test/lib/JSONStream/index.js +0 -118
  12. package/test/lib/JSONStream/package.json +0 -13
  13. package/test/lib/JSONStream/readme.markdown +0 -120
  14. package/test/lib/JSONStream/test/fixtures/all_docs_include.json +0 -4245
  15. package/test/lib/JSONStream/test/fixtures/all_npm.json +0 -4030
  16. package/test/lib/JSONStream/test/parsejson.js +0 -25
  17. package/test/lib/JSONStream/test/stringify.js +0 -41
  18. package/test/lib/JSONStream/test/test.js +0 -35
  19. package/test/lib/JSONStream/test/test2.js +0 -29
  20. package/test/lib/JSONStream/test/two-ways.js +0 -41
  21. package/test/lib/jquery-1.7.1.min.js +0 -4
  22. package/test/lib/json2.js +0 -487
  23. package/test/lib/mocha-0.3.6.js +0 -2672
  24. package/test/lib/request/LICENSE +0 -55
  25. package/test/lib/request/README.md +0 -285
  26. package/test/lib/request/main.js +0 -618
  27. package/test/lib/request/mimetypes.js +0 -146
  28. package/test/lib/request/oauth.js +0 -34
  29. package/test/lib/request/package.json +0 -15
  30. package/test/lib/request/tests/googledoodle.png +0 -0
  31. package/test/lib/request/tests/run.sh +0 -6
  32. package/test/lib/request/tests/server.js +0 -57
  33. package/test/lib/request/tests/test-body.js +0 -90
  34. package/test/lib/request/tests/test-cookie.js +0 -29
  35. package/test/lib/request/tests/test-cookiejar.js +0 -90
  36. package/test/lib/request/tests/test-errors.js +0 -30
  37. package/test/lib/request/tests/test-oauth.js +0 -109
  38. package/test/lib/request/tests/test-pipes.js +0 -167
  39. package/test/lib/request/tests/test-proxy.js +0 -39
  40. package/test/lib/request/tests/test-timeout.js +0 -87
  41. package/test/lib/request/uuid.js +0 -19
  42. package/test/lib/request/vendor/cookie/index.js +0 -55
  43. package/test/lib/request/vendor/cookie/jar.js +0 -72
  44. package/test/perf.js +0 -44
  45. package/test/resources/big.js +0 -9
  46. package/test/resources/big.json +0 -29159
  47. package/test/resources/big.txt +0 -128457
  48. package/test/resources/big_browser.js +0 -29159
  49. package/test/resources/npm.js +0 -26
  50. package/test/resources/npm.json +0 -84701
  51. package/test/resources/perf1.js +0 -144
  52. package/test/resources/perf2.js +0 -366
  53. package/test/spell.js +0 -276
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
- var fs = require('fs')
3
- , spell = require('../../spell')
4
- , request = require('../lib/request')
5
- , JSONStream = require('../lib/JSONStream')
6
- , dict = spell()
7
- , get_stream =
8
- request('http://isaacs.couchone.com/registry/_all_docs?include_docs=true')
9
- , parse_stream = JSONStream.parse(['rows', /./, 'doc'])
10
- ;
11
-
12
- get_stream.pipe(parse_stream);
13
- parse_stream.on('data', function (module) {
14
- try {
15
- dict.load(JSON.stringify(module), {reset:false});
16
- if(module.name)
17
- dict.add_word(module.name, 10000); // a name is like a 10thousand words
18
- } catch (e) {
19
- console.log('!!! ', e);
20
- console.log('----', JSON.stringify(module));
21
- }
22
- });
23
- parse_stream.on('end', function () {
24
- console.log('> npm.json');
25
- fs.writeFileSync('npm.json', JSON.stringify(dict.export(),null,2));
26
- });