{ "_id": "onetime", "_rev": "23-7678056a1c1df40ea4816fb6d92a7ba5", "name": "onetime", "description": "Ensure a function is only called once", "dist-tags": { "latest": "5.1.2" }, "versions": { "0.1.0": { "name": "onetime", "version": "0.1.0", "description": "Only call a function once. Unlike the module `once`, this one isn't naughty extending `Function.prototype`.", "keywords": [ "once", "one", "single", "call", "function", "prevent" ], "license": "MIT", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "files": [ "onetime.js" ], "main": "onetime.js", "repository": { "type": "git", "url": "git://github.com/sindresorhus/onetime" }, "scripts": { "test": "mocha" }, "devDependencies": { "mocha": "~1.x" }, "engines": { "node": ">=0.8.0" }, "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime", "_id": "onetime@0.1.0", "dist": { "shasum": "971beb7a622f1396b9cf4ef7277262f2b01c8565", "tarball": "https://registry.npmjs.org/onetime/-/onetime-0.1.0.tgz" }, "_from": ".", "_npmVersion": "1.3.17", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {} }, "0.1.1": { "name": "onetime", "version": "0.1.1", "description": "Only call a function once. Unlike the module `once`, this one isn't naughty extending `Function.prototype`.", "keywords": [ "once", "one", "single", "call", "function", "prevent" ], "license": "MIT", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "files": [ "onetime.js" ], "main": "onetime.js", "repository": { "type": "git", "url": "git://github.com/sindresorhus/onetime" }, "scripts": { "test": "mocha" }, "devDependencies": { "mocha": "*" }, "engines": { "node": ">=0.8.0" }, "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime", "_id": "onetime@0.1.1", "dist": { "shasum": "f4204dc15a47f80c43779340d093ad786c1bab21", "tarball": "https://registry.npmjs.org/onetime/-/onetime-0.1.1.tgz" }, "_from": ".", "_npmVersion": "1.4.6", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {} }, "1.0.0": { "name": "onetime", "version": "1.0.0", "description": "Only call a function once. Unlike the module `once`, this one isn't naughty extending `Function.prototype`.", "keywords": [ "once", "one", "single", "call", "function", "prevent" ], "license": "MIT", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "files": [ "index.js" ], "repository": { "type": "git", "url": "git://github.com/sindresorhus/onetime" }, "scripts": { "test": "mocha" }, "devDependencies": { "mocha": "*" }, "engines": { "node": ">=0.10.0" }, "gitHead": "a4aa1ce5291cc5f32ecb8f4b0a918b12cb47ea5e", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime", "_id": "onetime@1.0.0", "_shasum": "3a08a8e39d7816df52d34886374fb8ed8b651f62", "_from": ".", "_npmVersion": "1.4.14", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "dist": { "shasum": "3a08a8e39d7816df52d34886374fb8ed8b651f62", "tarball": "https://registry.npmjs.org/onetime/-/onetime-1.0.0.tgz" }, "directories": {} }, "1.1.0": { "name": "onetime", "version": "1.1.0", "description": "Only call a function once", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/sindresorhus/onetime" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "once", "one", "single", "call", "function", "prevent" ], "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "6fae2fb77b95b49719d1c270d8ba07d9515bdfe8", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime", "_id": "onetime@1.1.0", "_shasum": "a1f7838f8314c516f05ecefcbc4ccfe04b4ed789", "_from": ".", "_npmVersion": "2.14.7", "_nodeVersion": "4.2.1", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "a1f7838f8314c516f05ecefcbc4ccfe04b4ed789", "tarball": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {} }, "2.0.0": { "name": "onetime", "version": "2.0.0", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=4" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^1.0.0" }, "devDependencies": { "ava": "*", "xo": "*" }, "xo": { "esnext": true }, "gitHead": "bb498adb2da79e62b923173480803a9c6f759766", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@2.0.0", "_shasum": "52aa8110e52fc5126ffc667bd8ec21c2ed209ce6", "_from": ".", "_npmVersion": "2.15.9", "_nodeVersion": "4.6.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "52aa8110e52fc5126ffc667bd8ec21c2ed209ce6", "tarball": "https://registry.npmjs.org/onetime/-/onetime-2.0.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/onetime-2.0.0.tgz_1476902515797_0.18329595238901675" }, "directories": {} }, "2.0.1": { "name": "onetime", "version": "2.0.1", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=4" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^1.0.0" }, "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "32bca382f5934c8fe7fd78bcef9ad16b3474948f", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@2.0.1", "_shasum": "067428230fd67443b2794b22bba528b6867962d4", "_from": ".", "_npmVersion": "2.15.11", "_nodeVersion": "4.7.3", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "067428230fd67443b2794b22bba528b6867962d4", "tarball": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/onetime-2.0.1.tgz_1489980257371_0.244376125279814" }, "directories": {} }, "3.0.0": { "name": "onetime", "version": "3.0.0", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava" }, "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^1.0.0" }, "devDependencies": { "ava": "^1.1.0", "xo": "^0.24.0" }, "gitHead": "2057a659c432c544e2f14bee3b7e99abc210ba9c", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@3.0.0", "_nodeVersion": "8.15.0", "_npmVersion": "6.6.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-t2j1nTo7vb2m/ZQAq5rcWjQgAglF/2rnvlO0cxkZ1GFOSEt0sQBHaytm5tC1ZNUlmKZAp5XF44kolGL9W/XJ2w==", "shasum": "7fc4d348742091d2510328455a556cf137e16d75", "tarball": "https://registry.npmjs.org/onetime/-/onetime-3.0.0.tgz", "fileCount": 4, "unpackedSize": 3798, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRJXlCRA9TVsSAnZWagAAKKkP/jZDW6DTGZu4c6tLTFPc\nGHyKtLQvDOeo8WECIMrmK4QsId/RgJmlEHSjxEnWm0mXaM5A5GbrtARfl92U\nhUurfEdm1lkLljrmRZxMJ3/NFMMhAuRjXYsZ2LP45anqxEwreEspp59iL36b\nxSpi6uDDspYxleIgCmeXY5cSq/I7aXx1j42oCJzgznWSuVCBn5/S7g3sTZan\nwHfGMLi0jg733ccG8SgnNUgKCJuUEjMgWm8geS6Ks2I9gxJItipl2yYqo50S\n65nYEo94T9Q+bIz3hoyBLj25+ajT6oAtj1OQWI4XqBGEcKLPKyrjdwRc1uLB\nv7wUdoIwerc1Qm7mLqEiSLGabsH+CXOG/G1d3rFbYeZqKDapWhEP9S1ZAOzx\n+Rk5UJnw9AENOK5jfx32BvShAzAoyNj/ZYWMsQyIgQ6kORXoh/1pRBv1nRnK\n3p2TvSFwIEvEGPvwMz3bWCjAt4FZlDu34x80J5h7YxjUuEKuE5h0Omup2UcR\nXwXbob7oytHDtbJ5kSljeIWXe7+SHGAGa944nU5LWo5T0T/9jCohBzOe25h+\nh8ue2KvarQPkO7JUHHUIQMvqpv3spQ2k7yPh8mKl/MSUTQVShF3CbzG52CHw\ngvkbCRX1SSVEG3nnb9EO4yJIlTdF6xAS7k1saJyz/wTN0nyFZqV69jB/lEPg\nkD2W\r\n=NG+A\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/onetime_3.0.0_1547998692929_0.8925190275053334" }, "_hasShrinkwrap": false }, "4.0.0": { "name": "onetime", "version": "4.0.0", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava && tsd-check" }, "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^1.0.0" }, "devDependencies": { "ava": "^1.1.0", "tsd-check": "^0.3.0", "xo": "^0.24.0" }, "gitHead": "65ad3c02a2ad06d6ec1f49ce80c98f4a5c172bf6", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@4.0.0", "_nodeVersion": "10.15.1", "_npmVersion": "6.8.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-woeNhttKxY5jRwaoDMB74JYFaJAAegWXNcXm4CLd4DBfd4ZkrQeIPol0YylMyUd5uG/g6cPAUULYlPIruQSz6A==", "shasum": "143112c91abc470e9e70a7b2636ce773c1fdf5b2", "tarball": "https://registry.npmjs.org/onetime/-/onetime-4.0.0.tgz", "fileCount": 5, "unpackedSize": 5117, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcePgqCRA9TVsSAnZWagAAn5UP/2yF7Iu4Gs4i4sWgyl3m\nbEW8JvbJ6ac/Xkik8CJbUdzOfCW7YO+/P9TJHX0VP0yylOuaW2r/bcap4ZpO\nXmwwSICCsLQs3DLnjNGGONjDyI8JwozR9JdzIP129KorQXesOkhamPb0PsCa\nvi2pb2TuFqNDS3WFaoxCj+U2tNIXCxv3sN4BRK9iCSx8Qme9IKT79ECDaxOh\n1YJsFoBr//z6nKgmJZ2x8NZM6vYc01AGnYwFNFbODl1O1T6Qye4jbABMI/NH\nb680FQeBfweg2jVr6CPNBr4KzAOsqiwc8DCI12E5lxnET+8oGiPCvRQ7IlX+\nrwo1OdQGofi/Pdo6al281E4ZH8NzyXgMYSabqIp49w9zQmDX2z30a3jOKWww\n5u5yYBcIlxWDuh5hjheyOVSI+bqD/iwhvkxX+sBW2SWicUZRULHsuNI+j8q7\nj0OSZ9Wnc++fpciIeBh59BQ3PhE53hsekkjxMrKwGoC3YCsjQ/WcygbCqyDh\npg63g34BRpuXt+oreIkJF+nOFmnwhCIvH0yTMnicIwTpy0qMwxsTdxf99nJa\nI8uJJJSxsfb7icQI5Oq+339FVAg2QK66eHcPWMOlEl7TyucqvwYPFUZCvuxm\nJQJyPsnOjxUTCWqzZ1TaictfK5QPQ8euKwZXEhnqoKD/0PqslTFJT+4CAWv3\nso2T\r\n=Ehwi\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/onetime_4.0.0_1551431721222_0.5847573580409424" }, "_hasShrinkwrap": false }, "5.0.0": { "name": "onetime", "version": "5.0.0", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava && tsd-check" }, "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^2.0.0" }, "devDependencies": { "ava": "^1.3.1", "tsd-check": "^0.3.0", "xo": "^0.24.0" }, "gitHead": "4f1b26154e811b5af3958b759b7c29a2c4692ebd", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@5.0.0", "_nodeVersion": "8.15.0", "_npmVersion": "6.8.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-0RaJAdwj6KznGJJdJNHmjCUmtsURmC1SLoTzoa9qI5LY8hODas/vjVlEUL19xaSSZfualrMh4myK0dNhVSgDJA==", "shasum": "eae9df4c4e114f4fe194167bc14cce2d71939606", "tarball": "https://registry.npmjs.org/onetime/-/onetime-5.0.0.tgz", "fileCount": 5, "unpackedSize": 5264, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcggSKCRA9TVsSAnZWagAAcroP/0nvOtQL8JNaCBWgt82Y\nrwN3R4G7THTdkAWVlOSwP4icxL5JJAY2O6e2zetTtsh0283pbE0MEVAby3ul\nV+2p/uZk9eCRB5SHBmt0gC6z0FXjJ1+lWEnwE9I0Vl2VtkLlpQu3oX6uWLef\nuvY5BcLGTj/xa8sDXlLIURgVrOE/I+yXaYmd0KBoA3CQfaMpnSk2txFq8gO1\nu51gvc954fIGuzQLy4vJ4A9RbCMaDP9fVmBS9G+YcZBVec5g/WzMtQska/D2\ni9XkJvTyTuyMGlU5lyDsu/V2PGKXM8O3peqmCsTcnF6YtFbURUclwX81hlSn\nyeH6NZTmPfg6TLixRNl9KhR7u1jV+o8kWNUY6PYjMtjw5bDECTVs7l8Y4oiX\n0CqKygv+h6T7Os6eu+gWTOix30OqEejxinc60x88DiuOzuCI07X8/YX0QQfB\nebVImZO4k2Vv+J2sqgjDjnz9gU16pGqdeCkYACaxPWbkM4/rByUfIXlwiubu\nkZSM/JxKwG+MYj5zj3ld/XMFj3YzLLjgmHbe1oIKNg4Kf9sHQDg5Idh5irU3\nEzpFioQTVodjIPuuLL2qNhQTUYcaPSL9oL8fbTrhOYmBbe0r50vzokpc2O17\nTjgVG5MBt5nbyRYAtztr2iqctPeXkQAP5+nzsCu5HZ4hvVOAFEHZo4/bT1OA\nP37m\r\n=XBd0\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/onetime_5.0.0_1552024713328_0.24572920152994504" }, "_hasShrinkwrap": false }, "5.1.0": { "name": "onetime", "version": "5.1.0", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava && tsd" }, "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^2.1.0" }, "devDependencies": { "ava": "^1.4.1", "tsd": "^0.7.1", "xo": "^0.24.0" }, "gitHead": "8bb24f70649ee69849a0701477ebc7170e7a4f87", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@5.1.0", "_nodeVersion": "8.15.0", "_npmVersion": "6.9.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", "shasum": "fff0f3c91617fe62bb50189636e99ac8a6df7be5", "tarball": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", "fileCount": 5, "unpackedSize": 5343, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcost0CRA9TVsSAnZWagAAgbwP/3keiMz92/ghCXk+03Zf\nCK4b/Tip5syC5+mB+ZocghkVETcpmVxyJP6rpz2Jy/I3uSv18oKWRvBAv4xP\nYeDmGVfvNotyp9rKvgCfNDQOyVfskdSyRoG4b+SSyWDFQx4+CquAsdOOIRzh\nrdFH0VIttukJRmQsSjpNQ75TByL09bNMc83oLD9atKNURYPVbny8IcnMp/Ml\nbLtZbRvIG8WuSoEE2EozESMAG48q8/LK1aYEuMWdxllUSPSQsLaxOpLjbHfB\nSlp4Ilz6OPAjrwv912izwJfljIH2y0w30PoprGoF2p7+Xz8cmH9WcQMszQZz\nWQvQdZV2MquJGppoJ5hbK6gqxFeIeZ78HLFvyowp7lx2I27aei2AEVHIE7jv\ntywjziWNxSdbKwLCGEdpES2lAzIQqVG6LQEBTa19TR8yNgFlX5AFVZfx4Mtw\nbEfwWejKyuQMohSDRnGQLUXiosIdFlEIrwH/FMZL3D9d4AC+5+AcZjDP9wID\nafIpFvpDyYzBAAKVi0EIB6tp8+T7zZ7XXnk1z0tAAJ6SpxjVroffjzIBf8OS\nqRRNBBsPgsp6bLnsm7NQcatfcciOtzzo3RP4bLcGiLVwYr2MPLhc+NZFmZqU\nKg2Wdh1nR9Yf5cNuKa1DEf24vLOwhcoraS0ZuStmiR/ofuZxET2ZLAof3aVV\nC9Kk\r\n=RzSo\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/onetime_5.1.0_1554172787964_0.04244092407114519" }, "_hasShrinkwrap": false }, "5.1.1": { "name": "onetime", "version": "5.1.1", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava && tsd" }, "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^2.1.0" }, "devDependencies": { "ava": "^1.4.1", "tsd": "^0.7.1", "xo": "^0.24.0" }, "gitHead": "59e0ad2204b5d44b448a71afb13f228d1977f07f", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@5.1.1", "_nodeVersion": "14.5.0", "_npmVersion": "6.14.5", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-ZpZpjcJeugQfWsfyQlshVoowIIQ1qBGSVll4rfDq6JJVO//fesjoX808hXWfBjY+ROZgpKDI5TRSRBSoJiZ8eg==", "shasum": "5c8016847b0d67fcedb7eef254751cfcdc7e9418", "tarball": "https://registry.npmjs.org/onetime/-/onetime-5.1.1.tgz", "fileCount": 5, "unpackedSize": 6173, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJpVjCRA9TVsSAnZWagAA2xQP/2GUXW7XqJBsodgB7rig\nzrVUJhnp0fxhrAf6zqeeCkCnBJRNGQToqg+c+wZVoMo70+r+vwH3sGbJXJLd\n7vraWS3wJBGrrImzLDGck4YF0DKQ4vzNBrWvEpdTZhiJp3/IUSY2C5GJ8CyB\nMiR8Q66/ylWf8OqbRsbCn4iGPCnm4aOGHObXVVehbHgIxPgzKnykp4bRjr3P\nDTrKolDIOGQV5poP0BK0qBeYvLcWeCDa/+nAUVxjXNVsBrpfeXeqjfUkfmAf\nuKdFiD/b0DCo4qcpKu9TNB77ZYraUDHSYrISwt7A2TffhzGzIUX1liZ5oDyh\nYrvHok8Fc7Rf0fvKpCdoNdsrkUpWtS+ESS7usSnp5c/Kb9Vq1nCPeoSyS2Kh\nswlP1n1JHzDsDUa3aeS9jZV7KxxERIJZfOXAwpzzHG3d7HaVa379C7BslKSY\nL6PhlYZesTXg/j8qRyXdOppF1T145VvV8JLHKpvj38v+F8P8t6LnHUAeFuAE\nW7c81AFYgPckuIzlu5cwY1kuFXE5y9uXv/5HxneOe1s+jjTYTM+i8BYEOMPp\nx1BTymCRNlm7X+uHQkrxsEp94UIUBXFM0XGgtf4wwr7vS/lyxVtZiADrTjlC\nccNfRI7GowFc6DFUBTqqJAUXaHfDVBapOHSuYVYRjlzXUuPznysun2tPa5PC\n8EMe\r\n=/FeN\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/onetime_5.1.1_1596364130751_0.20576953897408923" }, "_hasShrinkwrap": false }, "5.1.2": { "name": "onetime", "version": "5.1.2", "description": "Ensure a function is only called once", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava && tsd" }, "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "dependencies": { "mimic-fn": "^2.1.0" }, "devDependencies": { "ava": "^1.4.1", "tsd": "^0.7.1", "xo": "^0.24.0" }, "gitHead": "4fa3c9a40798476514fec36a1720dc85b897cc04", "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "_id": "onetime@5.1.2", "_nodeVersion": "14.5.0", "_npmVersion": "6.14.7", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "shasum": "d0e96ebb56b07476df1dd9c4806e5237985ca45e", "tarball": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "fileCount": 5, "unpackedSize": 6173, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMFyRCRA9TVsSAnZWagAAInsP/RTd8G7KIVrwux1TNO4h\nS+Ymvz0874gBCS5I8tXFkdVSVAqPUNX3undeJIAHSqV7UMdAPx8wiFDqmga1\n28xR3LA8iHSyo1pxxIboH1LWJgaG2NWIfFV/fAPLvPJzEqmQ4zU0ioYhiwjj\n+MRlfRbkvFSqF9bdIm29VEKLzJPBtLM+BnHHmHigB3IA+fkhy81oo5ESmUPC\nUBeMJyXVMHU9v6r/0PQtqfTnVD68c+1o6yfevC8P0CjOCydJlWltCfKXhMNw\nxTVUxzaU4rfEHXsosGV79jCfLDcibLVdbjAMFzq1P6HaAKSl0ry2TrHKC/o/\nusdJe6U/jqxRN9moiuyh+qxR/9heTMXGgP1xrq0m9jwJlU681vlaPcQaQlM0\nZ0x3/TC1F+Nj6vOTG3lPBunne+H/0D4vu5MSDha8uzyAJ0mHarP+/hPP9gEZ\nUB9cT2djKZATqv4S+S3WKvYZa+m5pupDzVV4YbF3XgCSBe4mB23GdzllY76x\n9SCs7s7d6jUc+0FO/WhyASagXxeqqEwsrN4GRhfUB5l2y9/Le/j7sACW+YU7\nS4c6ony0Tojzb3ncc5zbebH/tskKZb6SCd6nZFBKs/CpDNqDueIkIyjbWLPH\nHUcN6AgD/j5xyIxeIbYc0HH7bc0NovpQbGeP8sIe1o+nS2WOTnjx0LPMCUP1\noLdv\r\n=J6Zn\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/onetime_5.1.2_1597004944849_0.8241938525832997" }, "_hasShrinkwrap": false } }, "readme": "# onetime [![Build Status](https://travis-ci.com/sindresorhus/onetime.svg?branch=master)](https://travis-ci.com/github/sindresorhus/onetime)\n\n> Ensure a function is only called once\n\nWhen called multiple times it will return the return value from the first call.\n\n*Unlike the module [once](https://github.com/isaacs/once), this one isn't naughty and extending `Function.prototype`.*\n\n## Install\n\n```\n$ npm install onetime\n```\n\n## Usage\n\n```js\nconst onetime = require('onetime');\n\nlet i = 0;\n\nconst foo = onetime(() => ++i);\n\nfoo(); //=> 1\nfoo(); //=> 1\nfoo(); //=> 1\n\nonetime.callCount(foo); //=> 3\n```\n\n```js\nconst onetime = require('onetime');\n\nconst foo = onetime(() => {}, {throw: true});\n\nfoo();\n\nfoo();\n//=> Error: Function `foo` can only be called once\n```\n\n## API\n\n### onetime(fn, options?)\n\nReturns a function that only calls `fn` once.\n\n#### fn\n\nType: `Function`\n\nFunction that should only be called once.\n\n#### options\n\nType: `object`\n\n##### throw\n\nType: `boolean`\\\nDefault: `false`\n\nThrow an error when called more than once.\n\n### onetime.callCount(fn)\n\nReturns a number representing how many times `fn` has been called.\n\nNote: It throws an error if you pass in a function that is not wrapped by `onetime`.\n\n```js\nconst onetime = require('onetime');\n\nconst foo = onetime(() => {});\n\nfoo();\nfoo();\nfoo();\n\nconsole.log(onetime.callCount(foo));\n//=> 3\n```\n\n#### fn\n\nType: `Function`\n\nFunction to get call count from.\n\n## onetime for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of onetime and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-onetime?utm_source=npm-onetime&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "time": { "modified": "2020-08-09T20:29:07.242Z", "created": "2013-12-13T21:20:15.964Z", "0.1.0": "2013-12-13T21:20:18.951Z", "0.1.1": "2014-04-30T22:39:14.004Z", "1.0.0": "2014-08-13T17:03:51.426Z", "1.1.0": "2015-12-18T00:30:55.390Z", "2.0.0": "2016-10-19T18:41:56.004Z", "2.0.1": "2017-03-20T03:24:17.619Z", "3.0.0": "2019-01-20T15:38:13.275Z", "4.0.0": "2019-03-01T09:15:21.375Z", "5.0.0": "2019-03-08T05:58:33.472Z", "5.1.0": "2019-04-02T02:39:48.168Z", "5.1.1": "2020-08-02T10:28:50.856Z", "5.1.2": "2020-08-09T20:29:04.963Z" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/onetime.git" }, "homepage": "https://github.com/sindresorhus/onetime#readme", "keywords": [ "once", "function", "one", "onetime", "func", "fn", "single", "call", "called", "prevent" ], "bugs": { "url": "https://github.com/sindresorhus/onetime/issues" }, "license": "MIT", "readmeFilename": "readme.md", "users": { "schnittstabil": true, "n370": true, "anhulife": true, "quocnguyen": true, "rocket0191": true, "lamansky": true, "reyronald": true } }