{"_id":"@financial-times/n-content-decorator","_rev":"47-16853200cee354a79b70e3cf443a23f3","name":"@financial-times/n-content-decorator","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@financial-times/n-content-decorator","version":"1.0.0","license":"MIT","_id":"@financial-times/n-content-decorator@1.0.0","maintainers":[{"name":"financial-times","email":"strategic.products@ft.com"}],"homepage":"https://github.com/Financial-Times/n-content-decorator#readme","bugs":{"url":"https://github.com/Financial-Times/n-content-decorator/issues"},"dist":{"shasum":"7192821f03b2bb7eb8def5fa675c202ba031a3f8","tarball":"https://registry.npmjs.org/@financial-times/n-content-decorator/-/n-content-decorator-1.0.0.tgz","integrity":"sha512-egYIRMjHlJZklg//Bmb5PxhedA7Zxsrog6Ocq8zDhemL4ONpWuYP9OJW9BVWFjjYdAZJNo7AqqTQ57JVB+ZqVA==","signatures":[{"sig":"MEUCIBa8TCwt1vQi5+cu76UrdKAabTmOGetJF++hFZNfW6rGAiEAsKz1Zf2LQF08XYF5lMX6d/KbtW8QGuJvORBynTz+RuA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"main.js","_from":".","_shasum":"7192821f03b2bb7eb8def5fa675c202ba031a3f8","scripts":{},"_npmUser":{"name":"financial-times","email":"strategic.products@ft.com"},"deprecated":"This package is no longer supported","repository":{"url":"git://github.com/Financial-Times/n-content-decorator.git","type":"git"},"_npmVersion":"2.14.7","description":"Decorates FT content prior to rendering","directories":{},"_nodeVersion":"4.2.1","dependencies":{"cheerio":"^0.19.0","ft-n-article-branding":"^3.0.6"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","sinon":"^1.17.3","eslint":"^2.10.2","istanbul":"^0.4.2","coveralls":"^2.11.6","proxyquire":"^1.7.9","lintspaces-cli":"^0.1.1","npm-prepublish":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/n-content-decorator-1.0.0.tgz_1473936767662_0.6454244065098464","host":"packages-16-east.internal.npmjs.com"}},"1.0.1":{"name":"@financial-times/n-content-decorator","version":"1.0.1","license":"MIT","_id":"@financial-times/n-content-decorator@1.0.1","maintainers":[{"name":"financial-times","email":"strategic.products@ft.com"}],"homepage":"https://github.com/Financial-Times/n-content-decorator#readme","bugs":{"url":"https://github.com/Financial-Times/n-content-decorator/issues"},"dist":{"shasum":"72eef10386929bf2a25ed6997d2e61285a28d3c5","tarball":"https://registry.npmjs.org/@financial-times/n-content-decorator/-/n-content-decorator-1.0.1.tgz","integrity":"sha512-knLtmG4LQQQf9u3FyDRJDeIP1Joc6sTh+AP715RbADlJNnl/1Mfk7lEFDVBXs3mQl2qxcF38yGBCVhRMfWlQOg==","signatures":[{"sig":"MEUCIALryRIwJ4rVOU9MsGo4ye+RdNY2E734lEruCFqn4y1CAiEAv1lvzvsaF09AP9VLi0HhZKxhz5FeNVQRXyOKrPS4kMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"main.js","_from":".","_shasum":"72eef10386929bf2a25ed6997d2e61285a28d3c5","scripts":{},"_npmUser":{"name":"financial-times","email":"strategic.products@ft.com"},"deprecated":"This package is no longer supported","repository":{"url":"git://github.com/Financial-Times/n-content-decorator.git","type":"git"},"_npmVersion":"2.14.7","description":"Decorates FT content prior to rendering","directories":{},"_nodeVersion":"4.2.1","dependencies":{"cheerio":"^0.19.0","ft-n-article-branding":"^3.0.6"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","sinon":"^1.17.3","eslint":"^2.10.2","istanbul":"^0.4.2","coveralls":"^2.11.6","proxyquire":"^1.7.9","lintspaces-cli":"^0.1.1","npm-prepublish":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/n-content-decorator-1.0.1.tgz_1474283594393_0.5994357294403017","host":"packages-12-west.internal.npmjs.com"}},"1.0.2":{"name":"@financial-times/n-content-decorator","version":"1.0.2","license":"MIT","_id":"@financial-times/n-content-decorator@1.0.2","maintainers":[{"name":"financial-times","email":"strategic.products@ft.com"}],"homepage":"https://github.com/Financial-Times/n-content-decorator#readme","bugs":{"url":"https://github.com/Financial-Times/n-content-decorator/issues"},"dist":{"shasum":"634401e2f831093da9ce0d52dd802d6d08a9c2c8","tarball":"https://registry.npmjs.org/@financial-times/n-content-decorator/-/n-content-decorator-1.0.2.tgz","integrity":"sha512-tN37R8D51MfCjrNJGj9OB64UxDHbvvW2P4i+jxpwnF5YWg8foYK1sczr3f83MyG5QZP3QQnmviiTNQ+uqop9Cw==","signatures":[{"sig":"MEUCIQCXe+Q6Pqf5EEOb1zURAm7hsApdi0Lf8M8FqK3OqyzTogIgX74cfbFY35evIM0boI0SY96Txe6ELTrv2pLvGTP11eE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"main.js","_from":".","_shasum":"634401e2f831093da9ce0d52dd802d6d08a9c2c8","scripts":{},"_npmUser":{"name":"financial-times","email":"strategic.products@ft.com"},"deprecated":"This package is no longer supported","repository":{"url":"git://github.com/Financial-Times/n-content-decorator.git","type":"git"},"_npmVersion":"2.14.7","description":"Decorates FT content prior to rendering","directories":{},"_nodeVersion":"4.2.1","dependencies":{"cheerio":"^0.19.0","ft-n-article-branding":"^3.0.6"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","sinon":"^1.17.3","eslint":"^2.10.2","istanbul":"^0.4.2","coveralls":"^2.11.6","proxyquire":"^1.7.9","lintspaces-cli":"^0.1.1","npm-prepublish":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/n-content-decorator-1.0.2.tgz_1474289649672_0.15430393302813172","host":"packages-16-east.internal.npmjs.com"}},"1.0.3":{"name":"@financial-times/n-content-decorator","version":"1.0.3","license":"MIT","_id":"@financial-times/n-content-decorator@1.0.3","maintainers":[{"name":"financial-times","email":"strategic.products@ft.com"}],"homepage":"https://github.com/Financial-Times/n-content-decorator#readme","bugs":{"url":"https://github.com/Financial-Times/n-content-decorator/issues"},"dist":{"shasum":"1765dad8f26214ee3d2c712619812db7ef5ae6b0","tarball":"https://registry.npmjs.org/@financial-times/n-content-decorator/-/n-content-decorator-1.0.3.tgz","integrity":"sha512-ow7cBhAxfwKyTjVPiCEuKMIWBy+lwhqpsflA5Q0Z68j03Fq+9npye0ZKYAkkLJC9gOYdilU3olGOW45I+MgNnw==","signatures":[{"sig":"MEUCIQDmsbqJmJCvUwPJT2kDYqs7YGNQoj55BYRLnSEsoolCugIgLDLibAySzS8Wq/OaSqud2zMhahvHiV/YdXx5oqawjIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"main.js","_from":".","_shasum":"1765dad8f26214ee3d2c712619812db7ef5ae6b0","scripts":{},"_npmUser":{"name":"financial-times","email":"strategic.products@ft.com"},"deprecated":"This package is no longer supported","repository":{"url":"git://github.com/Financial-Times/n-content-decorator.git","type":"git"},"_npmVersion":"2.14.7","description":"Decorates FT content prior to rendering","directories":{},"_nodeVersion":"4.2.1","dependencies":{"cheerio":"^0.19.0","ft-n-article-branding":"^3.0.6"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","sinon":"^1.17.3","eslint":"^2.10.2","istanbul":"^0.4.2","coveralls":"^2.11.6","proxyquire":"^1.7.9","lintspaces-cli":"^0.1.1","npm-prepublish":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/n-content-decorator-1.0.3.tgz_1476975688295_0.8165891857352108","host":"packages-12-west.internal.npmjs.com"}},"1.0.4":{"name":"@financial-times/n-content-decorator","version":"1.0.4","license":"MIT","_id":"@financial-times/n-content-decorator@1.0.4","maintainers":[{"name":"financial-times","email":"strategic.products@ft.com"}],"homepage":"https://github.com/Financial-Times/n-content-decorator#readme","bugs":{"url":"https://github.com/Financial-Times/n-content-decorator/issues"},"dist":{"shasum":"38b7c630f592cffb9ad79973ad5c2fd8b8f90d8d","tarball":"https://registry.npmjs.org/@financial-times/n-content-decorator/-/n-content-decorator-1.0.4.tgz","integrity":"sha512-sSks1cqtdR8CmDJ3ewPD4Tvf0ycN0SlPW1UHOs8zBkCb4e/wu6dIfSy1L0Nwoj3QE1dxIHNiX9pFYUISJAQEfQ==","signatures":[{"sig":"MEYCIQCdqCDUhmQ8CL9c3aOFRcYelCGUm5vG8unfhWsjkcVG4AIhAPboNC//88N5shIo8MbG6IsB9o2NVtWQH2kx/UoeWBPU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"main.js","_from":".","_shasum":"38b7c630f592cffb9ad79973ad5c2fd8b8f90d8d","scripts":{},"_npmUser":{"name":"financial-times","email":"strategic.products@ft.com"},"deprecated":"This package is no longer supported","repository":{"url":"git://github.com/Financial-Times/n-content-decorator.git","type":"git"},"_npmVersion":"2.14.7","description":"Decorates FT content prior to rendering","directories":{},"_nodeVersion":"4.2.1","dependencies":{"cheerio":"^0.19.0","ft-n-article-branding":"^3.0.6"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","sinon":"^1.17.3","eslint":"^2.10.2","istanbul":"^0.4.2","coveralls":"^2.11.6","proxyquire":"^1.7.9","lintspaces-cli":"^0.1.1","npm-prepublish":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/n-content-decorator-1.0.4.tgz_1477493482722_0.33313465490937233","host":"packages-18-east.internal.npmjs.com"}},"1.0.5":{"name":"@financial-times/n-content-decorator","version":"1.0.5","license":"MIT","_id":"@financial-times/n-content-decorator@1.0.5","maintainers":[{"name":"financial-times","email":"strategic.products@ft.com"}],"homepage":"https://github.com/Financial-Times/n-content-decorator#readme","bugs":{"url":"https://github.com/Financial-Times/n-content-decorator/issues"},"dist":{"shasum":"e1d03c354744a811f779732ca0ff2c4034ff4455","tarball":"https://registry.npmjs.org/@financial-times/n-content-decorator/-/n-content-decorator-1.0.5.tgz","integrity":"sha512-IL9fA8zXsUKEgeyWQfkmdL0UgJxOVNR/PRYJnKUN4+nfwcU6fkqyX6/bhWc1+bIqOgumfi4doKFZyBss10Lduw==","signatures":[{"sig":"MEYCIQDio/K80qCBh9ZNifHTZPlrALL+lxWVxhWZRrXc735FoAIhALiI6CoVftw4E8GPnmGWdpn7CWTtGDtvj5xuTnTNVUA4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2HEBCRA9TVsSAnZWagAAYUUP/2ULxRZ/0QwkEBSg6EGy\nqNcjECvvQAajoiDG6hlI+kkNc3b9nTMgVbwxagBiDparkBHN/X3umjnnrA53\nNWnXv2nkuz0Q2FkbriZaDwD/XlJ/n9xGa7Wpg0ixwB+5YrBbmJVw57PTGFZm\nVM912tPFvgQplwIl2UcpfGiK82hSDRLW1absoUYePqHopyOWllb0nwbCAxDg\nZPVbOHyKFkv6AGfrBOy+UkPVQRFV9BjY7Zp8vdJFawFkEGchu4UG2MY688x7\n7u9EDoc+MzVaquCg86HEmzvjLSm424g48NODvLX9RPLR7dXZg+Jyry78es3p\n4mOoB4DCDnT2+kKq5NDZkgFcboRErNvfAgTnknf/iImbXruaThMXD3MEqKLb\n9CnkwrZ4/qgPBMePugH7WuK0EpXbuA3g0OPpitp5ad+sc1yNxuOlAR7go1sQ\nJ57gsOb3tT5kfX7yxPfM9Em67IlmfW7dnzfi3hndh4jhcuGYC+bZyfoBmrSU\nyQjhDvWPmv4SVbNzfhx3H7hNU9LLzVyMIbqGMbkVtYew3+pDI7Spb/5CVkMl\no/t2ywYmToAW6AQ6LtxiM6d181OFp/OsK7VbjgRorFpTPnjHAdonGP1gR115\ng8IHtMt9fdzP010gygxXnDl1U2SXqbmVxM4c8+MMzdDP/TnVQVA5KB9WgHcI\nhzr6\r\n=aqUz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"main.js","_from":".","_shasum":"e1d03c354744a811f779732ca0ff2c4034ff4455","scripts":{},"_npmUser":{"name":"financial-times","email":"strategic.products@ft.com"},"deprecated":"This package is no longer supported","repository":{"url":"git://github.com/Financial-Times/n-content-decorator.git","type":"git"},"_npmVersion":"2.14.7","description":"Decorates FT content prior to rendering","directories":{},"_nodeVersion":"4.2.1","dependencies":{"ft-n-article-branding":"^3.0.6"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","sinon":"^1.17.3","eslint":"^2.10.2","istanbul":"^0.4.2","coveralls":"^2.11.6","proxyquire":"^1.7.9","lintspaces-cli":"^0.1.1","npm-prepublish":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/n-content-decorator-1.0.5.tgz_1478004931383_0.6991427224129438","host":"packages-18-east.internal.npmjs.com"}}},"time":{"created":"2016-09-15T10:52:48.854Z","modified":"2026-06-23T16:02:25.381Z","1.0.0":"2016-09-15T10:52:48.854Z","1.0.1":"2016-09-19T11:13:16.178Z","1.0.2":"2016-09-19T12:54:11.585Z","1.0.3":"2016-10-20T15:01:30.329Z","1.0.4":"2016-10-26T14:51:24.932Z","1.0.5":"2016-11-01T12:55:31.965Z"},"bugs":{"url":"https://github.com/Financial-Times/n-content-decorator/issues"},"license":"MIT","homepage":"https://github.com/Financial-Times/n-content-decorator#readme","repository":{"url":"git://github.com/Financial-Times/n-content-decorator.git","type":"git"},"description":"Decorates FT content prior to rendering","maintainers":[{"email":"code.management@ft.com","name":"the-ft"},{"email":"info+npm@rowanmanning.com","name":"rowanmanning"},{"email":"yay@chee.party","name":"chee"},{"email":"a@ax.gy","name":"alexwilson"},{"email":"howdy@aendra.com","name":"aendra"},{"email":"emma.lewis@ft.com","name":"emmalewis"},{"email":"lee@leemoody.co.uk","name":"notlee"},{"email":"hamza.samih@ft.com","name":"hamza.samih"},{"email":"robert.boulton@ft.com","name":"robertboulton"},{"email":"leila.micollier@ft.com","name":"leila.micollier"},{"email":"rob.godfrey@ft.com","name":"robgodfrey"}],"readme":"[![Coverage Status](https://coveralls.io/repos/github/Financial-Times/n-content-decorator/badge.svg?branch=master)](https://coveralls.io/github/Financial-Times/n-content-decorator?branch=master)\n\n#n-content-decorator\n\nProvides decoration for content sourced either directly from the next Elastic Search cluster, or via the next-graphql-api, for compatibility for rendering content cards.\n\n##Options supported;\n\n###Decoration type\n\n`mutateOriginal: true` will mutate the object passed to it.\n\n`mutateOriginal: false` will return the decoration object, which can be merged in with the original object by the calling application (eg. `Object.assign(original, decoration)``).\n\n`false` is the default option and need not be passed in.\n\n###Excluded Taxonomies\n\n`excludeTaxonomies: true` prevents specific taxonomies (organisations, regions, people) from appearing in the tag that is returned.\n\n`excludeTaxonomies: false` leaves taxonomies unaffected.\n\n`false` is the default and need not be passed in.\n\n###Minor Branding\n\nDetermines how brand (if content is associated with a brand) is displayed.\n\n`minorBranding: true` brand appears below standfirst and primary Tag is shown eg. as on stream list.\n\n`minorBranding: false` brand replaces primary Tag at the top of the card.\n\n`false` is the default option and need not be passed in.\n\n(NOTE: the intention is to migrate this display option to n-card rather than handle it here)\n\n##Example usage\n\n###With an array of content items\n\n####With `mutateOriginal: false`\n\n```\nconst decoration = require('ft-n-content-decoration');\n\ncontentArray.map(content => Object.assign(content, decoration(content, {options})));\n\n```\n\n####With `mutateOriginal: true`\n\n```\nconst decorateContent = require('ft-n-content-decoration');\n\ncontentArray.map(content => decorateContent(content, {options}));\n\n```\n","readmeFilename":"README.md"}