"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/imurmurhash/package.json" (7 Feb 2017, 7063 Bytes) of archive /windows/misc/atom-windows.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) JSON source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {
    2   "_args": [
    3     [
    4       "imurmurhash@^0.1.4",
    5       "/Users/ogd/Documents/projects/npm/npm/node_modules/fs-write-stream-atomic"
    6     ]
    7   ],
    8   "_from": "imurmurhash@>=0.1.4 <0.2.0",
    9   "_id": "imurmurhash@0.1.4",
   10   "_inCache": true,
   11   "_installable": true,
   12   "_location": "/imurmurhash",
   13   "_npmUser": {
   14     "email": "jensyt@gmail.com",
   15     "name": "jensyt"
   16   },
   17   "_npmVersion": "1.3.2",
   18   "_phantomChildren": {},
   19   "_requested": {
   20     "name": "imurmurhash",
   21     "raw": "imurmurhash@^0.1.4",
   22     "rawSpec": "^0.1.4",
   23     "scope": null,
   24     "spec": ">=0.1.4 <0.2.0",
   25     "type": "range"
   26   },
   27   "_requiredBy": [
   28     "/fs-write-stream-atomic",
   29     "/npm",
   30     "/unique-slug",
   31     "/write-file-atomic"
   32   ],
   33   "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
   34   "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea",
   35   "_shrinkwrap": null,
   36   "_spec": "imurmurhash@^0.1.4",
   37   "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/fs-write-stream-atomic",
   38   "author": {
   39     "name": "Jens Taylor",
   40     "email": "jensyt@gmail.com",
   41     "url": "https://github.com/homebrewing"
   42   },
   43   "bugs": {
   44     "url": "https://github.com/jensyt/imurmurhash-js/issues"
   45   },
   46   "dependencies": {},
   47   "description": "An incremental implementation of MurmurHash3",
   48   "devDependencies": {},
   49   "directories": {},
   50   "dist": {
   51     "shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea",
   52     "tarball": "http://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz"
   53   },
   54   "engines": {
   55     "node": ">=0.8.19"
   56   },
   57   "files": [
   58     "README.md",
   59     "imurmurhash.js",
   60     "imurmurhash.min.js",
   61     "package.json"
   62   ],
   63   "homepage": "https://github.com/jensyt/imurmurhash-js",
   64   "keywords": [
   65     "hash",
   66     "incremental",
   67     "murmur",
   68     "murmurhash",
   69     "murmurhash3"
   70   ],
   71   "license": "MIT",
   72   "main": "imurmurhash.js",
   73   "maintainers": [
   74     {
   75       "name": "jensyt",
   76       "email": "jensyt@gmail.com"
   77     }
   78   ],
   79   "name": "imurmurhash",
   80   "optionalDependencies": {},
   81   "readme": "iMurmurHash.js\n==============\n\nAn incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).\n\nThis version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.\n\nInstallation\n------------\n\nTo use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.\n\n```html\n<script type=\"text/javascript\" src=\"/scripts/imurmurhash.min.js\"></script>\n<script>\n// Your code here, access iMurmurHash using the global object MurmurHash3\n</script>\n```\n\n---\n\nTo use iMurmurHash in Node.js, install the module using NPM:\n\n```bash\nnpm install imurmurhash\n```\n\nThen simply include it in your scripts:\n\n```javascript\nMurmurHash3 = require('imurmurhash');\n```\n\nQuick Example\n-------------\n\n```javascript\n// Create the initial hash\nvar hashState = MurmurHash3('string');\n\n// Incrementally add text\nhashState.hash('more strings');\nhashState.hash('even more strings');\n\n// All calls can be chained if desired\nhashState.hash('and').hash('some').hash('more');\n\n// Get a result\nhashState.result();\n// returns 0xe4ccfe6b\n```\n\nFunctions\n---------\n\n### MurmurHash3 ([string], [seed])\nGet a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:\n\n```javascript\n// Use the cached object, calling the function again will return the same\n// object (but reset, so the current state would be lost)\nhashState = MurmurHash3();\n...\n\n// Create a new object that can be safely used however you wish. Calling the\n// function again will simply return a new state object, and no state loss\n// will occur, at the cost of creating more objects.\nhashState = new MurmurHash3();\n```\n\nBoth methods can be mixed however you like if you have different use cases.\n\n---\n\n### MurmurHash3.prototype.hash (string)\nIncrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.\n\n---\n\n### MurmurHash3.prototype.result ()\nGet the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.\n\n```javascript\n// Do the whole string at once\nMurmurHash3('this is a test string').result();\n// 0x70529328\n\n// Do part of the string, get a result, then the other part\nvar m = MurmurHash3('this is a');\nm.result();\n// 0xbfc4f834\nm.hash(' test string').result();\n// 0x70529328 (same as above)\n```\n\n---\n\n### MurmurHash3.prototype.reset ([seed])\nReset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.\n\n---\n\nLicense (MIT)\n-------------\nCopyright (c) 2013 Gary Court, Jens Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
   82   "readmeFilename": "README.md",
   83   "repository": {
   84     "type": "git",
   85     "url": "git+https://github.com/jensyt/imurmurhash-js.git"
   86   },
   87   "scripts": {},
   88   "version": "0.1.4"
   89 }