{
  "_args": [
    [
      {
        "raw": "once@https://registry.npmjs.org/once/-/once-1.4.0.tgz",
        "scope": null,
        "escapedName": "once",
        "name": "once",
        "rawSpec": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
        "spec": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
        "type": "remote"
      },
      "/Users/weinand/MS/Projects/vscode-node-debug"
    ]
  ],
  "_from": "once@>=1.3.0 <2.0.0",
  "_id": "once@1.4.0",
  "_inCache": true,
  "_location": "/once",
  "_phantomChildren": {},
  "_requested": {
    "raw": "once@https://registry.npmjs.org/once/-/once-1.4.0.tgz",
    "scope": null,
    "escapedName": "once",
    "name": "once",
    "rawSpec": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
    "spec": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/",
    "/glob",
    "/glob-stream/glob",
    "/gulp-symdest/glob",
    "/gulp-typescript/glob",
    "/gulp-vinyl-zip/glob",
    "/inflight",
    "/tslint/findup-sync/glob",
    "/vscode-nls-dev/glob"
  ],
  "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
  "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
  "_shrinkwrap": null,
  "_spec": "once@https://registry.npmjs.org/once/-/once-1.4.0.tgz",
  "_where": "/Users/weinand/MS/Projects/vscode-node-debug",
  "author": {
    "name": "Isaac Z. Schlueter",
    "email": "i@izs.me",
    "url": "http://blog.izs.me/"
  },
  "bugs": {
    "url": "https://github.com/isaacs/once/issues"
  },
  "dependencies": {
    "wrappy": "1"
  },
  "description": "Run a function exactly one time",
  "devDependencies": {
    "tap": "^7.0.1"
  },
  "directories": {
    "test": "test"
  },
  "files": [
    "once.js"
  ],
  "homepage": "https://github.com/isaacs/once#readme",
  "keywords": [
    "once",
    "function",
    "one",
    "single"
  ],
  "license": "ISC",
  "main": "once.js",
  "name": "once",
  "optionalDependencies": {},
  "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n  cb = once(cb)\n  loader.load('file')\n  loader.once('load', cb)\n  loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n  cb = cb.once()\n  loader.load('file')\n  loader.once('load', cb)\n  loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n  cb = once(cb)\n  var stream = createStream()\n  stream.once('data', cb)\n  stream.once('end', function () {\n    if (!cb.called) cb(new Error('not found'))\n  })\n}\n```\n\n## `once.strict(func)`\n\nThrow an error if the function is called twice.\n\nSome functions are expected to be called only once. Using `once` for them would\npotentially hide logical errors.\n\nIn the example below, the `greet` function has to call the callback only once:\n\n```javascript\nfunction greet (name, cb) {\n  // return is missing from the if statement\n  // when no name is passed, the callback is called twice\n  if (!name) cb('Hello anonymous')\n  cb('Hello ' + name)\n}\n\nfunction log (msg) {\n  console.log(msg)\n}\n\n// this will print 'Hello anonymous' but the logical error will be missed\ngreet(null, once(msg))\n\n// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time\ngreet(null, once.strict(msg))\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git://github.com/isaacs/once.git"
  },
  "scripts": {
    "test": "tap test/*.js"
  },
  "version": "1.4.0"
}
