package.json 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {
  2. "_args": [
  3. [
  4. {
  5. "raw": "match-stream@>= 0.0.2 < 1",
  6. "scope": null,
  7. "escapedName": "match-stream",
  8. "name": "match-stream",
  9. "rawSpec": ">= 0.0.2 < 1",
  10. "spec": ">=0.0.2 <1.0.0",
  11. "type": "range"
  12. },
  13. "/home/king/Desktop/FINAL/AhMyth/app/node_modules/unzip"
  14. ]
  15. ],
  16. "_from": "match-stream@>=0.0.2 <1.0.0",
  17. "_id": "match-stream@0.0.2",
  18. "_inCache": true,
  19. "_installable": true,
  20. "_location": "/match-stream",
  21. "_npmUser": {
  22. "name": "evanoxfeld",
  23. "email": "eoxfeld@gmail.com"
  24. },
  25. "_npmVersion": "1.2.17",
  26. "_phantomChildren": {},
  27. "_requested": {
  28. "raw": "match-stream@>= 0.0.2 < 1",
  29. "scope": null,
  30. "escapedName": "match-stream",
  31. "name": "match-stream",
  32. "rawSpec": ">= 0.0.2 < 1",
  33. "spec": ">=0.0.2 <1.0.0",
  34. "type": "range"
  35. },
  36. "_requiredBy": [
  37. "/unzip"
  38. ],
  39. "_resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz",
  40. "_shasum": "99eb050093b34dffade421b9ac0b410a9cfa17cf",
  41. "_shrinkwrap": null,
  42. "_spec": "match-stream@>= 0.0.2 < 1",
  43. "_where": "/home/king/Desktop/FINAL/AhMyth/app/node_modules/unzip",
  44. "author": {
  45. "name": "Evan Oxfeld",
  46. "email": "eoxfeld@gmail.com"
  47. },
  48. "bugs": {
  49. "url": "https://github.com/EvanOxfeld/match-stream/issues"
  50. },
  51. "dependencies": {
  52. "buffers": "~0.1.1",
  53. "readable-stream": "~1.0.0"
  54. },
  55. "description": "Match a pattern within a stream",
  56. "devDependencies": {
  57. "stream-buffers": "~0.2.4",
  58. "tap": "~0.4.0"
  59. },
  60. "directories": {
  61. "example": "examples",
  62. "test": "test"
  63. },
  64. "dist": {
  65. "shasum": "99eb050093b34dffade421b9ac0b410a9cfa17cf",
  66. "tarball": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz"
  67. },
  68. "gitHead": "665dabbb0a3593310012eb041fc07395db632a20",
  69. "homepage": "https://github.com/EvanOxfeld/match-stream#readme",
  70. "keywords": [
  71. "match",
  72. "stream",
  73. "split"
  74. ],
  75. "license": "MIT",
  76. "main": "match.js",
  77. "maintainers": [
  78. {
  79. "name": "evanoxfeld",
  80. "email": "eoxfeld@gmail.com"
  81. }
  82. ],
  83. "name": "match-stream",
  84. "optionalDependencies": {},
  85. "readme": "match-stream [![Build Status](https://travis-ci.org/EvanOxfeld/match-stream.png)](https://travis-ci.org/EvanOxfeld/match-stream)\n============\n\nSupply a function to handle pattern matches within a NodeJS stream.\n\n## Installation\n\n```bash\n$ npm install match-stream\n```\n\n## Quick Examples\n\n### End stream on match\n\n```javascript\nvar MatchStream = require('match-stream');\nvar streamBuffers = require(\"stream-buffers\");\n\nvar ms = new MatchStream({ pattern: 'World'}, function (buf, matched, extra) {\n if (!matched) {\n return this.push(buf);\n }\n this.push(buf);\n return this.push(null); //signal end of data\n});\n\nvar sourceStream = new streamBuffers.ReadableStreamBuffer();\nsourceStream.put(\"Hello World\");\nvar writableStream = new streamBuffers.WritableStreamBuffer();\n\nsourceStream\n .pipe(ms)\n .pipe(writableStream)\n .once('close', function () {\n var str = writableStream.getContentsAsString('utf8');\n console.log('Piped data before pattern occurs:', \"'\" + str + \"'\");\n sourceStream.destroy();\n });\n\n//Output\n//Piped data before pattern occurs: 'Hello '\n```\n\n### Split stream\n\n```javascript\nvar MatchStream = require('match-stream');\nvar fs = require('fs');\n\nvar line = \"\";\nvar loremLines = [];\nvar ms = new MatchStream({ pattern: '.', consume: true}, function (buf, matched, extra) {\n line += buf.toString();\n if (matched) {\n loremLines.push(line.trim());\n line = \"\";\n }\n});\n\nfs.createReadStream('lorem.txt')\n .pipe(ms)\n .once('finish', function() {\n console.log(loremLines);\n });\n```\n\n## License\n\nMIT\n\n## Acknowledgements\n\nSpecial thanks to @wanderview for assisting with the API.\n\n",
  86. "readmeFilename": "README.md",
  87. "repository": {
  88. "type": "git",
  89. "url": "git+https://github.com/EvanOxfeld/match-stream.git"
  90. },
  91. "scripts": {
  92. "test": "./node_modules/.bin/tap ./test/*.js"
  93. },
  94. "version": "0.0.2"
  95. }