{
	"name": "protoduck",
	"versions": {
		"3.0.0": {
			"name": "protoduck",
			"version": "3.0.0",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"preversion": "npm t",
				"test": "standard && nyc -- mocha --reporter spec"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^3.0.0"
			},
			"devDependencies": {
				"mocha": "^3.0.2",
				"nyc": "^8.1.0",
				"standard": "^8.0.0"
			},
			"gitHead": "95477e4e91ca44ebeddcb3ea3a32ba5d77211665",
			"_id": "protoduck@3.0.0",
			"_shasum": "0d63c91d635b99bd3ef85c8e03fa0e92b92b2ac0",
			"_from": ".",
			"_npmVersion": "3.10.8",
			"_nodeVersion": "4.5.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "0d63c91d635b99bd3ef85c8e03fa0e92b92b2ac0",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-3.0.0.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-16-east.internal.npmjs.com",
				"tmp": "tmp/protoduck-3.0.0.tgz_1473473845590_0.6719098137691617"
			},
			"directories": {},
			"contributors": []
		},
		"3.0.1": {
			"name": "protoduck",
			"version": "3.0.1",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"preversion": "npm t",
				"postversion": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"test": "nyc -- mocha --reporter spec"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^3.0.1"
			},
			"devDependencies": {
				"mocha": "^3.0.2",
				"nyc": "^8.1.0",
				"standard": "^8.0.0"
			},
			"gitHead": "39b145a9dffc7c3955c47e0341ba850b3a88c185",
			"_id": "protoduck@3.0.1",
			"_shasum": "0b7df480f543e985f98eb60e56908fbcfbc4f83f",
			"_from": ".",
			"_npmVersion": "3.10.7",
			"_nodeVersion": "6.0.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "0b7df480f543e985f98eb60e56908fbcfbc4f83f",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-3.0.1.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-12-west.internal.npmjs.com",
				"tmp": "tmp/protoduck-3.0.1.tgz_1473496372376_0.8478816186543554"
			},
			"directories": {},
			"contributors": []
		},
		"3.1.0": {
			"name": "protoduck",
			"version": "3.1.0",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"preversion": "npm t",
				"postversion": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"test": "nyc -- mocha --reporter spec"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^3.0.1"
			},
			"devDependencies": {
				"mocha": "^3.0.2",
				"nyc": "^8.1.0",
				"standard": "^8.0.0"
			},
			"gitHead": "894a06fd38571cbb78d949f71cfce87d7d871675",
			"_id": "protoduck@3.1.0",
			"_shasum": "4f85fc86fece5386928827a82f710ec4619f77a4",
			"_from": ".",
			"_npmVersion": "3.10.7",
			"_nodeVersion": "6.0.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "4f85fc86fece5386928827a82f710ec4619f77a4",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-3.1.0.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-12-west.internal.npmjs.com",
				"tmp": "tmp/protoduck-3.1.0.tgz_1473496863016_0.5189731365535408"
			},
			"directories": {},
			"contributors": []
		},
		"3.2.0": {
			"name": "protoduck",
			"version": "3.2.0",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"preversion": "npm t",
				"postversion": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"test": "nyc -- mocha --reporter spec"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^3.1.0"
			},
			"devDependencies": {
				"mocha": "^3.0.2",
				"nyc": "^8.1.0",
				"standard": "^8.0.0"
			},
			"gitHead": "4eab890c6d8dd939cdc85e7d6da9e3b6289749ea",
			"_id": "protoduck@3.2.0",
			"_shasum": "e94d97c6209f17921cc01cca48ec3eeeffe4cd9c",
			"_from": ".",
			"_npmVersion": "3.10.8",
			"_nodeVersion": "4.5.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "e94d97c6209f17921cc01cca48ec3eeeffe4cd9c",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-3.2.0.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-16-east.internal.npmjs.com",
				"tmp": "tmp/protoduck-3.2.0.tgz_1473672581279_0.3328180224634707"
			},
			"directories": {},
			"contributors": []
		},
		"3.3.0": {
			"name": "protoduck",
			"version": "3.3.0",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"preversion": "npm t",
				"postversion": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"test": "nyc -- mocha --reporter spec"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^3.1.0"
			},
			"devDependencies": {
				"mocha": "^3.0.2",
				"nyc": "^8.1.0",
				"standard": "^8.0.0"
			},
			"gitHead": "6206de0a0193c9e4ac39b51193b2d9a4b9d74e83",
			"_id": "protoduck@3.3.0",
			"_shasum": "061767b866c90d7d4862de7ab9e484daeba576ff",
			"_from": ".",
			"_npmVersion": "3.10.8",
			"_nodeVersion": "4.5.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "061767b866c90d7d4862de7ab9e484daeba576ff",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-3.3.0.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-16-east.internal.npmjs.com",
				"tmp": "tmp/protoduck-3.3.0.tgz_1473774829790_0.8326838437933475"
			},
			"directories": {},
			"contributors": []
		},
		"3.3.1": {
			"name": "protoduck",
			"version": "3.3.1",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"preversion": "npm t",
				"postversion": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"test": "nyc -- mocha --reporter spec"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^3.1.0"
			},
			"devDependencies": {
				"mocha": "^3.0.2",
				"nyc": "^8.1.0",
				"standard": "^8.0.0"
			},
			"gitHead": "538fe42d2272f6a2a8c3911354708fdd8db6b22b",
			"_id": "protoduck@3.3.1",
			"_shasum": "6ab5349bd324c2908f5f4ebf4031e920da76a069",
			"_from": ".",
			"_npmVersion": "3.10.7",
			"_nodeVersion": "4.5.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "6ab5349bd324c2908f5f4ebf4031e920da76a069",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-3.3.1.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-16-east.internal.npmjs.com",
				"tmp": "tmp/protoduck-3.3.1.tgz_1474102689784_0.49956084205769"
			},
			"directories": {},
			"contributors": []
		},
		"3.3.2": {
			"name": "protoduck",
			"version": "3.3.2",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"preversion": "npm t",
				"postversion": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"test": "nyc -- mocha --reporter spec"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^3.2.1"
			},
			"devDependencies": {
				"mocha": "^3.0.2",
				"nyc": "^8.1.0",
				"standard": "^8.0.0"
			},
			"gitHead": "00752f5ad7229052767fefada9f62e5c7e02c92d",
			"_id": "protoduck@3.3.2",
			"_shasum": "45ed80eae335e40a4319b431a94bd18db6e74c2c",
			"_from": ".",
			"_npmVersion": "3.10.7",
			"_nodeVersion": "4.5.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "45ed80eae335e40a4319b431a94bd18db6e74c2c",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-3.3.2.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-16-east.internal.npmjs.com",
				"tmp": "tmp/protoduck-3.3.2.tgz_1474104812513_0.41933519160375"
			},
			"directories": {},
			"contributors": []
		},
		"4.0.0": {
			"name": "protoduck",
			"version": "4.0.0",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"prerelease": "npm t",
				"postrelease": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"release": "standard-version -s",
				"test": "tap -J --coverage test/*.js",
				"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
				"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"haskell",
				"rust",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "CC0-1.0",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^4.0.1"
			},
			"devDependencies": {
				"mocha": "^3.2.0",
				"nyc": "^10.2.0",
				"standard": "^10.0.2",
				"standard-version": "^4.0.0",
				"tap": "^10.3.2",
				"weallbehave": "^1.0.3",
				"weallcontribute": "^1.0.8"
			},
			"gitHead": "5cc0b6a8acf801aea34e4b2f738434f1eee1f5af",
			"_id": "protoduck@4.0.0",
			"_npmVersion": "4.5.0",
			"_nodeVersion": "7.9.0",
			"_npmUser": {
				"name": "zkat",
				"email": "kat@sykosomatic.org"
			},
			"dist": {
				"shasum": "fe4874d8c7913366cfd9ead12453a22cd3657f8e",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-4.0.0.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-18-east.internal.npmjs.com",
				"tmp": "tmp/protoduck-4.0.0.tgz_1492426103501_0.6706104853656143"
			},
			"directories": {},
			"contributors": []
		},
		"5.0.0": {
			"name": "protoduck",
			"version": "5.0.0",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"files": [
				"index.js"
			],
			"scripts": {
				"prerelease": "npm t",
				"postrelease": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"release": "standard-version -s",
				"test": "tap -J --coverage test/*.js",
				"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
				"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"haskell",
				"rust",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "MIT",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^4.0.1"
			},
			"devDependencies": {
				"mocha": "^3.2.0",
				"nyc": "^10.2.0",
				"standard": "^10.0.2",
				"standard-version": "^4.0.0",
				"tap": "^10.3.2",
				"weallbehave": "^1.0.3",
				"weallcontribute": "^1.0.8"
			},
			"gitHead": "42567d44789059b37cc0fae79e32c082b30d8642",
			"_id": "protoduck@5.0.0",
			"_npmVersion": "5.6.0",
			"_nodeVersion": "8.9.1",
			"_npmUser": {
				"name": "zkat",
				"email": "kzm@sykosomatic.org"
			},
			"dist": {
				"integrity": "sha512-agsGWD8/RZrS4ga6v82Fxb0RHIS2RZnbsSue6A9/MBRhB/jcqOANAMNrqM9900b8duj+Gx+T/JMy5IowDoO/hQ==",
				"shasum": "752145e6be0ad834cb25716f670a713c860dce70",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.0.tgz"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/protoduck-5.0.0.tgz_1513112558027_0.15918784798122942"
			},
			"directories": {},
			"contributors": []
		},
		"5.0.1": {
			"name": "protoduck",
			"version": "5.0.1",
			"description": "Fancy duck typing for the most serious of ducks.",
			"main": "index.js",
			"scripts": {
				"prerelease": "npm t",
				"postrelease": "npm publish && git push --follow-tags",
				"pretest": "standard",
				"release": "standard-version -s",
				"test": "tap -J --coverage test/*.js",
				"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
				"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/zkat/protoduck.git"
			},
			"keywords": [
				"oop",
				"util",
				"object oriented",
				"duck type",
				"ducktype",
				"ducktyping",
				"protocols",
				"multimethod",
				"clojure",
				"haskell",
				"rust",
				"generic",
				"functions",
				"clos",
				"polymorphism",
				"impl",
				"typeclass",
				"traits"
			],
			"author": {
				"name": "Kat Marchán",
				"email": "kzm@sykosomatic.org"
			},
			"license": "MIT",
			"bugs": {
				"url": "https://github.com/zkat/protoduck/issues"
			},
			"homepage": "https://github.com/zkat/protoduck#readme",
			"dependencies": {
				"genfun": "^5.0.0"
			},
			"devDependencies": {
				"mocha": "^5.2.0",
				"nyc": "^13.1.0",
				"standard": "^12.0.1",
				"standard-version": "^4.0.0",
				"tap": "^12.0.1",
				"weallbehave": "^1.0.3",
				"weallcontribute": "^1.0.8"
			},
			"gitHead": "f1d22f5d876270341c9b8ec1fc4b0c94d16c3bfe",
			"_id": "protoduck@5.0.1",
			"_npmVersion": "6.4.1",
			"_nodeVersion": "10.6.0",
			"_npmUser": {
				"name": "zkat",
				"email": "npm@zkat.tech"
			},
			"dist": {
				"integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==",
				"shasum": "03c3659ca18007b69a50fd82a7ebcc516261151f",
				"tarball": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz",
				"fileCount": 5,
				"unpackedSize": 26127,
				"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb01ClCRA9TVsSAnZWagAAOKkQAJFj8xJlSET7+JE6jH77\nbJDctV6LmuuhTsY2AJU06zD7BdFejkd7YUHxhC2PLhxswIA15JteAmDSGa01\n9eH7KN02fK+60i8SgBpm0tFyIip3Spv8wKisBGfnfqEnzGp5WANsnAVZ3LlW\nPAVmIVPyf+RW/fFj/0TA9otPhIpSw4vvbkMhBY2UNLPkZ9mM4nZsyAjwTPsE\nA+zZkNI3/5EMUtaI5hQJEFWENGTqKhZYQj1L/KlNbYXoEWAdVIZIiK3xrD/0\nwLUEd4SaR2ww74VZBZ7c0PfEHWhMnMYQ3+VRbqSF6ektdXPJ0IUmHcvFwNAk\nE7YUXGltkOVEk3Apto9/ELImFeQmX46bKlpmb5qBW28RKY16Kt4d6S7V6b1K\nkGeES3wt4QEmRMKvcHM15z6M5dI0iM70PqHA7L6O2MFXLI2ObDcVMO9WHGVJ\nFS/t9z+Ki2GA5SEDUiZ01n4IBk4Schj5udEELDyrKej2rGX17WkzCb1eKFSS\nP1TqY1AUeiwB3EOSHkiBNrq6rsHIOwsNprywiun3UqlUAJIPpP+6mdXCQqTj\nrtpCBqc2IXDlyI7/eqzHQ1mUMsomiOxwROtsSJqlFTivDI6tYw4Ca594Jwjc\ndUmAmX7oVWj3pdGk6fP7QVRRXV23wApicNSgS1sBy3Gs6YGaHDffvP9/klKK\ntacY\r\n=Ny/k\r\n-----END PGP SIGNATURE-----\r\n"
			},
			"maintainers": [
				{
					"name": "zkat",
					"email": "kat@sykosomatic.org"
				}
			],
			"directories": {},
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/protoduck_5.0.1_1540575383058_0.8585888176819949"
			},
			"_hasShrinkwrap": false,
			"contributors": []
		}
	},
	"time": {
		"modified": "2019-01-05T05:19:05.386Z",
		"created": "2016-09-10T02:17:28.099Z",
		"3.0.0": "2016-09-10T02:17:28.099Z",
		"3.0.1": "2016-09-10T08:32:52.635Z",
		"3.1.0": "2016-09-10T08:41:03.281Z",
		"3.2.0": "2016-09-12T09:29:43.301Z",
		"3.3.0": "2016-09-13T13:53:51.924Z",
		"3.3.1": "2016-09-17T08:58:11.518Z",
		"3.3.2": "2016-09-17T09:33:34.224Z",
		"4.0.0": "2017-04-17T10:48:25.444Z",
		"5.0.0": "2017-12-12T21:02:38.613Z",
		"5.0.1": "2018-10-26T17:36:37.456Z"
	},
	"users": {},
	"dist-tags": {
		"latest": "5.0.1"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"8e3353d035bdec860e045517457aa7fc\"",
			"fetched": 1594657084798
		}
	},
	"_distfiles": {
		"protoduck-3.0.0.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-3.0.0.tgz",
			"sha": "0d63c91d635b99bd3ef85c8e03fa0e92b92b2ac0",
			"registry": "npmjs"
		},
		"protoduck-3.0.1.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-3.0.1.tgz",
			"sha": "0b7df480f543e985f98eb60e56908fbcfbc4f83f",
			"registry": "npmjs"
		},
		"protoduck-3.1.0.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-3.1.0.tgz",
			"sha": "4f85fc86fece5386928827a82f710ec4619f77a4",
			"registry": "npmjs"
		},
		"protoduck-3.2.0.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-3.2.0.tgz",
			"sha": "e94d97c6209f17921cc01cca48ec3eeeffe4cd9c",
			"registry": "npmjs"
		},
		"protoduck-3.3.0.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-3.3.0.tgz",
			"sha": "061767b866c90d7d4862de7ab9e484daeba576ff",
			"registry": "npmjs"
		},
		"protoduck-3.3.1.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-3.3.1.tgz",
			"sha": "6ab5349bd324c2908f5f4ebf4031e920da76a069",
			"registry": "npmjs"
		},
		"protoduck-3.3.2.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-3.3.2.tgz",
			"sha": "45ed80eae335e40a4319b431a94bd18db6e74c2c",
			"registry": "npmjs"
		},
		"protoduck-4.0.0.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-4.0.0.tgz",
			"sha": "fe4874d8c7913366cfd9ead12453a22cd3657f8e",
			"registry": "npmjs"
		},
		"protoduck-5.0.0.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.0.tgz",
			"sha": "752145e6be0ad834cb25716f670a713c860dce70",
			"registry": "npmjs"
		},
		"protoduck-5.0.1.tgz": {
			"url": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz",
			"sha": "03c3659ca18007b69a50fd82a7ebcc516261151f",
			"registry": "npmjs"
		}
	},
	"_attachments": {},
	"_rev": "1-0a5267fdb6937d60",
	"_id": "protoduck",
	"readme": "# protoduck [![npm version](https://img.shields.io/npm/v/protoduck.svg)](https://npm.im/protoduck) [![license](https://img.shields.io/npm/l/protoduck.svg)](https://npm.im/protoduck) [![Travis](https://img.shields.io/travis/zkat/protoduck.svg)](https://travis-ci.org/zkat/protoduck) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/protoduck?svg=true)](https://ci.appveyor.com/project/zkat/protoduck) [![Coverage Status](https://coveralls.io/repos/github/zkat/protoduck/badge.svg?branch=latest)](https://coveralls.io/github/zkat/protoduck?branch=latest)\n\n[`protoduck`](https://github.com/zkat/protoduck) is a JavaScript library is a\nlibrary for making groups of methods, called \"protocols\".\n\nIf you're familiar with the concept of [\"duck\ntyping\"](https://en.wikipedia.org/wiki/Duck_typing), then it might make sense to\nthink of protocols as things that explicitly define what methods you need in\norder to \"clearly be a duck\".\n\n## Install\n\n`$ npm install -S protoduck`\n\n## Table of Contents\n\n* [Example](#example)\n* [Features](#features)\n* [Guide](#guide)\n  * [Introduction](#introduction)\n  * [Defining protocols](#defining-protocols)\n  * [Implementations](#protocol-impls)\n  * [Multiple dispatch](#multiple-dispatch)\n  * [Constraints](#constraints)\n* [API](#api)\n  * [`define()`](#define)\n  * [`proto.impl()`](#impl)\n\n### Example\n\n```javascript\nconst protoduck = require('protoduck')\n\n// Quackable is a protocol that defines three methods\nconst Quackable = protoduck.define({\n  walk: [],\n  talk: [],\n  isADuck: [() => true] // default implementation -- it's optional!\n})\n\n// `duck` must implement `Quackable` for this function to work. It doesn't\n// matter what type or class duck is, as long as it implements Quackable.\nfunction doStuffToDucks (duck) {\n  if (!duck.isADuck()) {\n    throw new Error('I want a duck!')\n  } else {\n    console.log(duck.walk())\n    console.log(duck.talk())\n  }\n}\n\n// ...In a different package:\nconst ducks = require('./ducks')\n\nclass Duck () {}\n\n// Implement the protocol on the Duck class.\nducks.Quackable.impl(Duck, {\n  walk () { return \"*hobble hobble*\" }\n  talk () { return \"QUACK QUACK\" }\n})\n\n// main.js\nducks.doStuffToDucks(new Duck()) // works!\n```\n\n### Features\n\n* Verifies implementations in case methods are missing or wrong ones added\n* Helpful, informative error messages\n* Optional default method implementations\n* Fresh JavaScript Feel™ -- methods work just like native methods when called\n* Methods can dispatch on arguments, not just `this` ([multimethods](https://npm.im/genfun))\n* Type constraints\n\n### Guide\n\n#### Introduction\n\nLike most Object-oriented languages, JavaScript comes with its own way of\ndefining methods: You simply add regular `function`s as properties to regular\nobjects, and when you do `obj.method()`, it calls the right code! ES6/ES2015\nfurther extended this by adding a `class` syntax that allowed this same system\nto work with more familiar syntax sugar: `class Foo { method() { ... } }`.\n\nThe point of \"protocols\" is to have a more explicit definitions of what methods\n\"go together\". That is, a protocol is a description of a type of object your\ncode interacts with. If someone passes an object into your library, and it fits\nyour defined protocol, the assumption is that the object will work just as well.\n\nDuck typing is a common term for this sort of thing: If it walks like a duck,\nand it talks like a duck, then it may as well be a duck, as far as any of our\ncode is concerned.\n\nMany other languages have similar or identical concepts under different names:\nJava's interfaces, Haskell's typeclasses, Rust's traits. Elixir and Clojure both\ncall them \"protocols\" as well.\n\nOne big advantage to using these protocols is that they let users define their\nown versions of some abstraction, without requiring the type to inherit from\nanother -- protocols are independent of inheritance, even though they're able to\nwork together with it. If you've ever found yourself in some sort of inheritance\nmess, this is exactly the sort of thing you use to escape it.\n\n#### Defining Protocols\n\nThe first step to using `protoduck` is to define a protocol. Protocol\ndefinitions look like this:\n\n```javascript\n// import the library first!\nconst protoduck = require('protoduck')\n\n// `Ducklike` is the name of our protocol. It defines what it means for\n// something to be \"like a duck\", as far as our code is concerned.\nconst Ducklike = protoduck.define([], {\n  walk: [], // This says that the protocol requires a \"walk\" method.\n  talk: [] // and ducks also need to talk\n  peck: [] // and they can even be pretty scary\n})\n```\n\nProtocols by themselves don't really *do* anything, they simply define what\nmethods are included in the protocol, and thus what will need to be implemented.\n\n#### Protocol Impls\n\nThe simplest type of definitions for protocols are as regular methods. In this\nstyle, protocols end up working exactly like normal JavaScript methods: they're\nadded as properties of the target type/object, and we call them using the\n`foo.method()` syntax. `this` is accessible inside the methods, as usual.\n\nImplementation syntax is very similar to protocol definitions, using `.impl`:\n\n```javascript\nclass Dog {}\n\n// Implementing `Ducklike` for `Dog`s\nDucklike.impl(Dog, [], {\n  walk () { return '*pads on all fours*' }\n  talk () { return 'woof woof. I mean \"quack\" >_>' }\n  peck (victim) { return 'Can I just bite ' + victim + ' instead?...' }\n})\n```\n\nSo now, our `Dog` class has two extra methods: `walk`, and `talk`, and we can\njust call them:\n\n```javascript\nconst pupper = new Dog()\n\npupper.walk() // *pads on all fours*\npupper.talk() // woof woof. I mean \"quack\" >_>\npupper.peck('this string') // Can I just bite this string instead?...\n```\n\n#### Multiple Dispatch\n\nYou may have noticed before that we have these `[]` in various places that don't\nseem to have any obvious purpose.\n\nThese arrays allow protocols to be implemented not just for a single value of\n`this`, but across *all arguments*. That is, you can have methods in these\nprotocols that use both `this`, and the first argument (or any other arguments)\nin order to determine what code to actually execute.\n\nThis type of method is called a multimethod, and is one of the differences\nbetween protoduck and the default `class` syntax.\n\nTo use it: in the protocol *definitions*, you put matching\nstrings in different spots where those empty arrays were, and when you\n*implement* the protocol, you give the definition the actual types/objects you\nwant to implement it on, and it takes care of mapping types to the strings you\ndefined, and making sure the right code is run:\n\n```javascript\nconst Playful = protoduck.define(['friend'], {// <---\\\n  playWith: ['friend'] // <------------ these correspond to each other\n})\n\nclass Cat {}\nclass Human {}\nclass Dog {}\n\n// The first protocol is for Cat/Human combination\nPlayful.impl(Cat, [Human], {\n  playWith (human) {\n    return '*headbutt* *purr* *cuddle* omg ilu, ' + human.name\n  }\n})\n\n// And we define it *again* for a different combination\nPlayful.impl(Cat, [Dog], {\n  playWith (dog) {\n    return '*scratches* *hisses* omg i h8 u, ' + dog.name\n  }\n})\n\n// depending on what you call it with, it runs different methods:\nconst cat = new Cat()\nconst human = new Human()\nconst dog = new Dog()\n\ncat.playWith(human) // *headbutt* *purr* *cuddle* omg ilu, Sam\ncat.playWith(dog) // *scratches* *hisses* omg i h8 u, Pupper\n```\n\n#### Constraints\n\nSometimes, you want to have all the functionality of a certain protocol, but you\nwant to add a few requirements or other bits an pieces. Usually, you would have\nto define the entire functionality of the \"parent\" protocol in your own protocol\nin order to pull this off. This isn't very DRY and thus prone to errors, missing\nor out-of-sync functionality, or other issues. You could also just tell users\n\"hey, if you implement this, make sure to implement that\", but there's no\nguarantee they'll know about it, or know which arguments map to what.\n\nThis is where constraints come in: You can define a protocol that expects\nanything that implements it to *also* implement one or more \"parent\" protocols.\n\n```javascript\nconst Show = proto.define({\n  // This syntax allows default impls without using arrays.\n  toString () {\n    return Object.prototype.toString.call(this)\n  },\n  toJSON () {\n    return JSON.stringify(this)\n  }\n})\n\nconst Log = proto.define({\n  log () { console.log(this.toString()) }\n}, {\n  where: Show()\n  // Also valid:\n  // [Show('this'), Show('a')]\n  // [Show('this', ['a', 'b'])]\n})\n\n// This fails with an error: must implement Show:\nLog.impl(MyThing)\n\n// So derive Show first...\nShow.impl(MyThing)\n// And now it's ok!\nLog.impl(MyThing)\n```\n\n### API\n\n#### <a name=\"define\"></a> `define(<types>?, <spec>, <opts>)`\n\nDefines a new protocol on across arguments of types defined by `<types>`, which\nwill expect implementations for the functions specified in `<spec>`.\n\nIf `<types>` is missing, it will be treated the same as if it were an empty\narray.\n\nThe types in `<spec>` entries must map, by string name, to the type names\nspecified in `<types>`, or be an empty array if `<types>` is omitted. The types\nin `<spec>` will then be used to map between method implementations for the\nindividual functions, and the provided types in the impl.\n\nProtocols can include an `opts` object as the last argument, with the following\navailable options:\n\n* `opts.name` `{String}` - The name to use when referring to the protocol.\n\n* `opts.where` `{Array[Constraint]|Constraint}` - Protocol constraints to use.\n\n* `opts.metaobject` - Accepts an object implementing the\n  `Protoduck` protocol, which can be used to alter protocol definition\n  mechanisms in `protoduck`.\n\n##### Example\n\n```javascript\nconst Eq = protoduck.define(['a'], {\n  eq: ['a']\n})\n```\n\n#### <a name=\"impl\"></a> `proto.impl(<target>, <types>?, <implementations>?)`\n\nAdds a new implementation to the given protocol across `<types>`.\n\n`<implementations>` must be an object with functions matching the protocol's\nAPI. If given, the types in `<types>` will be mapped to their corresponding\nmethod arguments according to the original protocol definition.\n\nIf a protocol is derivable -- that is, all its functions have default impls,\nthen the `<implementations>` object can be omitted entirely, and the protocol\nwill be automatically derived for the given `<types>`\n\n##### Example\n\n```javascript\nimport protoduck from 'protoduck'\n\n// Singly-dispatched protocols\nconst Show = protoduck.define({\n  show: []\n})\n\nclass Foo {\n  constructor (name) {\n    this.name = name\n  }\n}\n\nShow.impl(Foo, {\n  show () { return `[object Foo(${this.name})]` }\n})\n\nconst f = new Foo('alex')\nf.show() === '[object Foo(alex)]'\n```\n\n```javascript\nimport protoduck from 'protoduck'\n\n// Multi-dispatched protocols\nconst Comparable = protoduck.define(['target'], {\n  compare: ['target'],\n})\n\nclass Foo {}\nclass Bar {}\nclass Baz {}\n\nComparable.impl(Foo, [Bar], {\n  compare (bar) { return 'bars are ok' }\n})\n\nComparable.impl(Foo, [Baz], {\n  compare (baz) { return 'but bazzes are better' }\n})\n\nconst foo = new Foo()\nconst bar = new Bar()\nconst baz = new Baz()\n\nfoo.compare(bar) // 'bars are ok'\nfoo.compare(baz) // 'but bazzes are better'\n```"
}