{"bugs":{"url":"https://github.com/Janpot/microdata-node/issues"},"dist":{"shasum":"03f5fdef9a02c3c5eecbe6dbd85d838e7a09d53c","tarball":"https://registry.npmjs.org/microdata-node/-/microdata-node-2.0.0-0.tgz","fileCount":17,"integrity":"sha512-p0qCDW/ULlSzEMCgamGLR0NcQQj3ENHDrLXJygi6//yckKZHDwpITED01oVrK5NIhiNpyKnTSbGvISOKXXyFXg==","signatures":[{"sig":"MEQCIFKCCqM1kGlXcO22iTscIv0nxhHfDSaEI73q+cqg5T2UAiBykF81qV7I4z/+B9VAcYM0gUntp6XI4jzRjR70CPN56g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuYM1CRA9TVsSAnZWagAAJEIP/05dZu4TBmc9OzuY0RzV\nsuZljuY8h2Ic1QdV2vb8zI0eZULbJE+Rl9MFz5Xt60d3YG4y0YVgKFzHAJ8z\n/lJGmGb9TpO8vH8pkfpLIS/kgQstwsDCkYusGlMliaHiNItIrUk93wr1Y6+W\nEVo6Rs16zXq8SoAPoimOuN81eD5CKFyEDEkf4Qc8HHASExabopkK9tEEKnW2\nlnDEuY33B3uANEPHup+rwV3MSJfUTa6joOpOJ/CUUOdyXcrC8HvkVZ6WOjAV\nD1fnFB+NLBEXS/FgZTRkPcR2KthJ7cQ5njAt4e8gbNh6pDswFXvJKkpJEoK/\n14mGAkkPM//CyYCLXXF9S3mrUxsX3ckRVcQh7jF+1eSHNES7rC6jKAYWrn8W\nbcj/ghEkmJhl11eeB7IFLJUud580RGOQuXSgiDFlcYO9UEU7ixN9shkT7LmB\nkfYzC+1MsrDabx0KkX8eAxoteEpM1JgpA9Ea0OMp93bKzElsTEUEfhT6mX3O\nd7zoCpFmYWlspCqNAKT6wl3Icls4zjywGxcM3yxY1miREq4R6RtfbgL7Mu8k\n+/gbbGz9rrqYZXkyi4SEO+rOPgeIKoBuT517Q5UYdPe8dEsMrNN8wfWgkcDf\nOnbDXoyGKREivhj3O8H0WAohXduC4NecojpGiar1r7ecYOIjIiclhaQHvWut\no58i\r\n=UY2J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","name":"microdata-node","author":{"name":"Jan Potoms"},"readme":"microdata-node\n==============\n\n[![Build Status](https://travis-ci.org/Janpot/microdata-node.svg)](https://travis-ci.org/Janpot/microdata-node)\n\nMicrodata parser. Aims to be compatible with http://www.w3.org/TR/microdata/#json and http://www.w3.org/TR/microdata-rdf/\n\nDemo over at http://janpot.github.io/microdata-node.\n\n## Example:\n\n```js\nvar microdata = require('microdata-node');\n\nvar html =\n  '<section itemscope itemtype=\"http://schema.org/Person\"> ' +\n  '  Hello, my name is ' +\n  '  <span itemprop=\"name\">John Doe</span>, ' +\n  '  I am a ' +\n  '  <span itemprop=\"jobTitle\">graduate research assistant</span> ' +\n  '  at the ' +\n  '  <span itemprop=\"affiliation\">University of Dreams</span>. ' +\n  '  My friends call me ' +\n  '  <span itemprop=\"additionalName\">Johnny</span>. ' +\n  '  You can visit my homepage at ' +\n  '  <a href=\"http://www.JohnnyD.com\" itemprop=\"url\">www.JohnnyD.com</a>. ' +\n  '  <section itemprop=\"address\" itemscope itemtype=\"http://schema.org/PostalAddress\">' +\n  '    I live at ' +\n  '    <span itemprop=\"streetAddress\">1234 Peach Drive</span>,' +\n  '    <span itemprop=\"addressLocality\">Warner Robins</span>,' +\n  '    <span itemprop=\"addressRegion\">Georgia</span>.' +\n  '  </section>' +\n  '</section>';\n\nvar json = microdata.toJson(html, {\n  base: 'http://www.example.com'\n});\nconsole.log(JSON.stringify(json, null, 2));\n/*\n{\n  \"items\": [{\n    \"properties\": {\n      \"address\": [{\n        \"properties\": {\n          \"addressRegion\": [ \"Georgia\" ],\n          \"addressLocality\": [ \"Warner Robins\" ],\n          \"streetAddress\": [ \"1234 Peach Drive\" ]\n        },\n        \"type\": [ \"http://schema.org/PostalAddress\" ]\n      }],\n      \"url\": [ \"http://www.JohnnyD.com\" ],\n      \"additionalName\": [ \"Johnny\" ],\n      \"affiliation\": [ \"University of Dreams\" ],\n      \"jobTitle\": [ \"graduate research assistant\" ],\n      \"name\": [ \"John Doe\" ]\n    },\n    \"type\": [ \"http://schema.org/Person\" ]\n  }]\n}\n*/\n\nvar jsonld = microdata.toJsonld(html, {\n  base: 'http://www.example.com'\n});\nconsole.log(JSON.stringify(jsonld, null, 2));\n/*\n[{\n  \"@id\": \"_:0\",\n  \"@type\": [ \"http://schema.org/Person\" ],\n  \"http://schema.org/address\": [{ \"@id\": \"_:1\" }],\n  \"http://schema.org/url\": [{ \"@id\": \"http://www.JohnnyD.com\" }],\n  \"http://schema.org/additionalName\": [{ \"@value\": \"Johnny\" }],\n  \"http://schema.org/affiliation\": [{ \"@value\": \"University of Dreams\" }],\n  \"http://schema.org/jobTitle\": [{ \"@value\": \"graduate research assistant\" }],\n  \"http://schema.org/name\": [{ \"@value\": \"John Doe\" }]\n}, {\n  \"@id\": \"_:1\",\n  \"@type\": [ \"http://schema.org/PostalAddress\" ],\n  \"http://schema.org/addressRegion\": [{ \"@value\": \"Georgia\" }],\n  \"http://schema.org/addressLocality\": [{ \"@value\": \"Warner Robins\" }],\n  \"http://schema.org/streetAddress\": [{ \"@value\": \"1234 Peach Drive\" }]\n}]\n*/\n```\n\n## API\n\n    microdata.toJson(html, [config])\n\nparses the provided html to [microdata json](http://www.w3.org/TR/microdata/#json)\n\n    microdata.toJsonld(html, [config])\n\nparses the provided html to [jsonld](http://json-ld.org/)\n\n\n**options**\n\n`config.base`: Base url to resolve url properties against.\n\n`config.registry`: The [registry](http://www.w3.org/TR/microdata-rdf/#dfn-registry) associates a URI prefix with one or more key-value pairs denoting processor behavior.\n\n`config.useRdfType`: (default `false`) If set to true, `rdf:type` predicates won't be converted to `@type` properties.\n\n`config.strict`: (default `false`) Parse strictly according to spec. Does not try to be forgiving of malformed microdata.\n\n`config.useNativeTypes`: (default `true`) Converts literals that are numbers or booleans to their corresponding JSOn type.\n\n","gitHead":"14000c572b06e17c7e7cf4ad71bab4343755607e","license":"MIT","scripts":{"tsc":"tsc","jest":"jest","lint":"semistandard --verbose | snazzy","test":"npm run lint && npm run tsc && npm run jest","watch:jest":"npm run jest -- -w","download-tests":"node ./scripts/download-tests.js","download-nt-tests":"rm -rf ./test/nt && mkdir ./test/nt && curl http://www.w3.org/2013/N-TriplesTests/TESTS.tar.gz | tar xz -C ./test/nt"},"_npmUser":{"name":"janpotoms","email":"potoms.jan@gmail.com"},"homepage":"https://github.com/Janpot/microdata-node","keywords":["microdata","parser"],"repository":{"url":"git+https://janpot@github.com/Janpot/microdata-node.git","type":"git"},"_npmVersion":"6.14.4","description":"Microdata to json and json-ld parser","directories":{},"maintainers":[{"name":"janpotoms","email":"potoms.jan@gmail.com"}],"_nodeVersion":"13.13.0","dependencies":{"domutils":"^2.1.0","htmlparser2":"^4.1.0","is-absolute-url":"^3.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"n3":"^1.3.6","jest":"^26.0.1","jsonld":"^3.1.0","snazzy":"^8.0.0","request":"^2.51.0","typescript":"^3.8.3","@types/node":"^13.13.5","semistandard":"^14.2.0"},"_npmOperationalInternal":{"tmp":"tmp/microdata-node_2.0.0-0_1589216052540_0.6982374044191813","host":"s3://npm-registry-packages"},"_id":"microdata-node@2.0.0-0","version":"2.0.0-0"}