{"name":"to-style","version":"1.3.2","description":"Convert style objects to style strings","main":"index.js","scripts":{"build":"browserify --standalone toStyle index.js -o dist/toStyle.js","test":"make test","test-w":"make test-w","test-debug":"mocha --debug-brk --require should"},"repository":{"type":"git","url":"git://github.com/radubrehar/toStyle.git"},"dependencies":{},"devDependencies":{"should":"~4.0.4","mocha":"~1.20.1"},"author":{"name":"Radu Brehar"},"license":"MIT","bugs":{"url":"https://github.com/radubrehar/toStyle/issues"},"keywords":["style","css","object","conver","style","to","string"],"gitHead":"c3c3e35b1f07619453e0f797b6af173694588829","homepage":"https://github.com/radubrehar/toStyle","_id":"to-style@1.3.2","_shasum":"aebbcc16dc065a5e28e82f7575c196a58c1e1580","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"dist":{"shasum":"aebbcc16dc065a5e28e82f7575c196a58c1e1580","tarball":"http://registry-npm.ywwl.com/to-style/download/to-style-1.3.2.tgz","integrity":"sha512-SNoPAEcvOrmdJKiWd/R9FoQE0yTn3Sye4NOCtScybsN7GbA+JVx2jQKBSZQeVC3FaLwDNCaaHN9yGAP63TXEjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGM95V9Lb4nPxDGBGnfNFpHQjPNADq/ZGBwvhXmvtGNfAiEA6fXqHT6lLORO1bi8jz2SW19Ho1RA2PpMpzBvhUwJ4D4="}],"size":17125,"noattachment":false,"key":"/to-style/-/to-style-1.3.2.tgz"},"directories":{},"readme":"toStyle\n=======\n\nConverts style objects to strings. Can be used on node or in the browser.\n\n## Install\n\n```npm install to-style```\n\n## Usage\n\n```js\nvar toStyleString = require('to-style').string\nvar toStyleObject = require('to-style').object\n```\n\n### toStyleString\n\n```js\ntoStyleString({\n    border: {\n        width: 1,\n        color: 'red'\n    },\n    padding: 4,\n    margin: {\n        top: 5\n    }\n}) == 'border-width: 1px; border-color: red; padding: 4px; margin-top: 5px;'\n```\n\n### toStyleObject\n```js\n\ntoStyleObject({\n    padding: {\n        top: 3,\n        bottom: 2\n    },\n    border: '1px solid red',\n    margin: 4\n}) // =>\n/*\n{\n    'padding-top': '3px',\n    'padding-bottom': '2px',\n    'border': '1px solid red',\n    'margin': '4px'\n}\n */\n```\n\nYou can also get your styles in camel-case, just pass a config object as a second argument to ```toStyleObject```, with ```camelize: true```\n\nExample:\n\n```js\ntoStyleObject({\n    padding: {\n        top: 10\n    },\n    'border-width': 20\n}, { camelize: true})\n\n/**\n *  {\n *      paddingTop: '10px',\n *      borderWidth: '20px'\n *  }\n */\n```\n\n## Usage in browser\n\nIn browser, make sure you add ```dist/toStyle.js``` to your page. This exposes a global ```toStyle``` variable.\n\n```js\nvar toStyleString = toStyle.string\nvar toStyleObject = toStyle.object\n\n```","publish_time":1421933190680,"_cnpm_publish_time":1421933190680,"dist-tags":{"latest":"1.3.3"}}