{"name":"inline-style-parser","version":"0.1.0","description":"An inline style parser.","main":"index.js","scripts":{"build":"npm run clean && npm run build:min && npm run build:unmin","build:min":"NODE_ENV=production rollup --config --output.file dist/inline-style-parser.min.js --sourcemap","build:unmin":"NODE_ENV=development rollup --config --file dist/inline-style-parser.js","clean":"rm -rf dist","coveralls":"cat coverage/lcov.info | coveralls","lint":"eslint --ignore-path .gitignore .","lint:fix":"npm run lint -- --fix","prepublishOnly":"npm run build","release":"standard-version --no-verify","test":"jest","test:ci":"npm run test:coverage -- --ci","test:coverage":"jest --coverage --collectCoverageFrom=index.js","test:watch":"jest --watch"},"repository":{"type":"git","url":"git+https://github.com/remarkablemark/inline-style-parser.git"},"bugs":{"url":"https://github.com/remarkablemark/inline-style-parser/issues"},"keywords":["inline-style-parser","inline-style","style","parser","css"],"devDependencies":{"@commitlint/cli":"^8.0.0","@commitlint/config-conventional":"^8.0.0","coveralls":"^3.0.4","css":"2.2.4","eslint":"^5.16.0","eslint-plugin-prettier":"^3.1.0","husky":"^2.4.1","jest":"^24.8.0","lint-staged":"^8.2.1","prettier":"^1.18.2","rollup":"^1.15.6","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-uglify":"^6.0.2","standard-version":"^6.0.1"},"license":"MIT","gitHead":"bffebd294b05bfb1907ac62a0d6a6c86fcb9dd60","homepage":"https://github.com/remarkablemark/inline-style-parser#readme","_id":"inline-style-parser@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.15.0","_npmUser":{"name":"remarkablemark","email":"mark@remarkablemark.org"},"dist":{"integrity":"sha512-+zpJ/vXukEsGqBpyo5+u+/SaXEQiAqxDQQWLa4MStQ2zhAIzKQCg4RvxIfHoFcrbaLhCSoQ0XyzjtU0Gmmrqvw==","shasum":"14331ea469281afaec0e06d46c6511e45f1d3d37","tarball":"http://registry-npm.ywwl.com/inline-style-parser/download/inline-style-parser-0.1.0.tgz","fileCount":4,"unpackedSize":14322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCsiKCRA9TVsSAnZWagAAieUP/1vMjcTSp0eET0W7d1vm\nognftgclq2WA88QV2cxqtZGbPmVS2RCsG1aYt0cn7soxQVmFLBKLaLNhBVgV\nJWZrR88IE/lGzLrg92TuQzKtt6KSrrxwPLFyHN1W8bNOaQ93l1ebu/PQlKDg\nj9QxirZpoGQq50hr32d9sOMypLVVzXNWMhy8/Qv19Q3AR31KWHmNCEY7NR+u\n1GGnzOLKyXjkMme9BuBmGn/y5DESUc4VAu3Vau9C9Fcl5rFL1eUyl5qSvP6h\nGJw2oNSOrQCclyodx+uwwBJFgSa2j5kASQd4CP0Eqdm56cy1nye6Uq3lQGmq\nxyQzeMfFKd9o6qhw/vLRVmkQRgKUJXOrJ/Wjq60WLmjovDoAvFGBzYUf1eVK\nC866Fihh0cwsJTnnVJAIKHJQLJY+CUJt6+NwYyvuipXj+60CP+W82DRBeRMZ\n4r4lhAfqh07rxSAiH7vW3NbX39KHLRHzq2G3BabOUrLxNb+LjvpwGwyf7aBL\nDsooPt0QKsLgHPQTdT28VTsTfeMincsrEN1Un353u8y1TAiUJbbp+7OoC8sd\nMABlcBCJQ95aoGw4kV9OsmapFxhqtpkyXWfwnwozWzvXWaKkDti0dQLvy7O4\nmZhQlDykN/fU92RVlJiJNxs4NzMQ1crhZNogqOs39b1pmqhhycjOpELXRypg\nLaFO\r\n=rAgI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJYH/Y0QAoUigcDK9zrEVtqlArY/YJIFVW3JmmNoYxHAIhAPZFhY/muSDfgKYWQu6tvaxGmakNscJ7DisEJZnm7G6N"}],"size":4584,"noattachment":false,"key":"/inline-style-parser/-/inline-style-parser-0.1.0.tgz"},"maintainers":[{"name":"remarkablemark","email":"mark@remarkablemark.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inline-style-parser_0.1.0_1560987786099_0.8492640641584099"},"_hasShrinkwrap":false,"readme":"# inline-style-parser\n\n[![NPM](https://nodei.co/npm/inline-style-parser.png)](https://nodei.co/npm/inline-style-parser/)\n\n[![NPM version](https://badgen.net/npm/v/inline-style-parser)](https://www.npmjs.com/package/inline-style-parser)\n[![Bundlephobia minified + gzip](https://badgen.net/bundlephobia/minzip/inline-style-parser)](https://bundlephobia.com/package/inline-style-parser)\n[![build](https://github.com/remarkablemark/inline-style-parser/actions/workflows/build.yml/badge.svg)](https://github.com/remarkablemark/inline-style-parser/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/remarkablemark/inline-style-parser/branch/master/graph/badge.svg?token=B8EEK5709W)](https://codecov.io/gh/remarkablemark/inline-style-parser)\n[![NPM downloads](https://badgen.net/npm/dm/inline-style-parser)](https://www.npmjs.com/package/inline-style-parser)\n\nInline style parser copied from [`css/lib/parse/index.js`](https://github.com/reworkcss/css/blob/v2.2.4/lib/parse/index.js):\n\n```\nInlineStyleParser(string)\n```\n\nExample:\n\n```js\nconst parse = require('inline-style-parser');\n\nparse('color: #BADA55;');\n```\n\nOutput:\n\n```js\n[ { type: 'declaration',\n    property: 'color',\n    value: '#BADA55',\n    position: Position { start: [Object], end: [Object], source: undefined } } ]\n```\n\n[JSFiddle](https://jsfiddle.net/remarkablemark/hcxbpwq8/) | [Replit](https://replit.com/@remarkablemark/inline-style-parser) | [Examples](https://github.com/remarkablemark/inline-style-parser/tree/master/examples)\n\n## Installation\n\n[NPM](https://www.npmjs.com/package/inline-style-parser):\n\n```sh\nnpm install inline-style-parser --save\n```\n\n[Yarn](https://yarnpkg.com/package/inline-style-parser):\n\n```sh\nyarn add inline-style-parser\n```\n\n[CDN](https://unpkg.com/inline-style-parser/):\n\n```html\n<script src=\"https://unpkg.com/inline-style-parser@latest/dist/inline-style-parser.min.js\"></script>\n<script>\n  window.InlineStyleParser(/* string */);\n</script>\n```\n\n## Usage\n\nImport with ES Modules:\n\n```js\nimport parse from 'inline-style-parser';\n```\n\nOr require with CommonJS:\n\n```js\nconst parse = require('inline-style-parser');\n```\n\nParse single declaration:\n\n```js\nparse('left: 0');\n```\n\nOutput:\n\n```js\n[\n  {\n    type: 'declaration',\n    property: 'left',\n    value: '0',\n    position: {\n      start: { line: 1, column: 1 },\n      end: { line: 1, column: 8 },\n      source: undefined\n    }\n  }\n]\n```\n\nParse multiple declarations:\n\n```js\nparse('left: 0; right: 100px;');\n```\n\nOutput:\n\n```js\n[\n  {\n    type: 'declaration',\n    property: 'left',\n    value: '0',\n    position: {\n      start: { line: 1, column: 1 },\n      end: { line: 1, column: 8 },\n      source: undefined\n    }\n  },\n  {\n    type: 'declaration',\n    property: 'right',\n    value: '100px',\n    position: {\n      start: { line: 1, column: 10 },\n      end: { line: 1, column: 22 },\n      source: undefined\n    }\n  }\n]\n```\n\nParse declaration with missing value:\n\n```js\nparse('top:');\n```\n\nOutput:\n\n```js\n[\n  {\n    type: 'declaration',\n    property: 'top',\n    value: '',\n    position: {\n      start: { line: 1, column: 1 },\n      end: { line: 1, column: 5 },\n      source: undefined\n    }\n  }\n]\n```\n\nParse unknown declaration:\n\n```js\nparse('answer: 42;');\n```\n\nOutput:\n\n```js\n[\n  {\n    type: 'declaration',\n    property: 'answer',\n    value: '42',\n    position: {\n      start: { line: 1, column: 1 },\n      end: { line: 1, column: 11 },\n      source: undefined\n    }\n  }\n]\n```\n\nInvalid declarations:\n\n```js\nparse('');      // []\nparse();        // throws TypeError\nparse(1);       // throws TypeError\nparse('width'); // throws Error\nparse('/*');    // throws Error\n```\n\n## Testing\n\nRun tests:\n\n```sh\nnpm test\n```\n\nRun tests in watch mode:\n\n```sh\nnpm run test:watch\n```\n\nRun tests with coverage:\n\n```sh\nnpm run test:coverage\n```\n\nRun tests in CI mode:\n\n```sh\nnpm run test:ci\n```\n\nLint files:\n\n```sh\nnpm run lint\n```\n\nFix lint errors:\n\n```sh\nnpm run lint:fix\n```\n\n## Release\n\nRelease and publish are automated by [Release Please](https://github.com/googleapis/release-please).\n\n## License\n\n[MIT](https://github.com/remarkablemark/inline-style-parser/blob/master/LICENSE). See the [license](https://github.com/reworkcss/css/blob/v2.2.4/LICENSE) from the original project.\n","publish_time":1560987786236,"_cnpm_publish_time":1560987786236,"dist-tags":{"latest":"0.2.9"}}