{"_id":"to-style","_rev":"309995","name":"to-style","description":"Convert style objects to style strings","dist-tags":{"latest":"1.3.3"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"time":{"modified":"2021-06-03T19:44:57.000Z","created":"2014-08-06T12:48:49.663Z","1.3.3":"2015-01-22T13:35:37.914Z","1.3.2":"2015-01-22T13:26:30.680Z","1.3.1":"2014-10-02T04:55:44.835Z","1.3.0":"2014-09-30T08:58:53.082Z","1.2.0":"2014-09-23T12:02:58.664Z","1.1.0":"2014-09-04T11:49:50.914Z","1.0.2":"2014-08-06T12:59:11.441Z","1.0.1":"2014-08-06T12:50:59.805Z","1.0.0":"2014-08-06T12:48:49.663Z"},"users":{"weifei365":true,"oleg_tsyba":true},"author":{"name":"Radu Brehar"},"repository":{"type":"git","url":"git://github.com/radubrehar/toStyle.git"},"versions":{"1.3.3":{"name":"to-style","version":"1.3.3","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":"43e38cfbfb361091f916666954a501669997da15","homepage":"https://github.com/radubrehar/toStyle","_id":"to-style@1.3.3","_shasum":"63a2b70a6f4a7d4fdc2ed57a0be4e7235cb6699c","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"dist":{"shasum":"63a2b70a6f4a7d4fdc2ed57a0be4e7235cb6699c","size":17203,"noattachment":false,"key":"/to-style/-/to-style-1.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.3.3.tgz"},"directories":{},"publish_time":1421933737914,"_cnpm_publish_time":1421933737914,"_hasShrinkwrap":false},"1.3.2":{"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","size":17125,"noattachment":false,"key":"/to-style/-/to-style-1.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.3.2.tgz"},"directories":{},"publish_time":1421933190680,"_cnpm_publish_time":1421933190680,"_hasShrinkwrap":false},"1.3.1":{"name":"to-style","version":"1.3.1","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":{"ustring":"^1.4.0"},"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"],"_id":"to-style@1.3.1","dist":{"shasum":"4de79652740d1c5df722b8f8c92dde8ab10f5ff2","size":8457,"noattachment":false,"key":"/to-style/-/to-style-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.3.1.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"directories":{},"publish_time":1412225744835,"_cnpm_publish_time":1412225744835,"_hasShrinkwrap":false},"1.3.0":{"name":"to-style","version":"1.3.0","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":{"ustring":"^1.4.0"},"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"],"_id":"to-style@1.3.0","dist":{"shasum":"0d3dd41a49137888be26294b9afd7cd7d5b0c2fe","size":8324,"noattachment":false,"key":"/to-style/-/to-style-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.3.0.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"directories":{},"publish_time":1412067533082,"_cnpm_publish_time":1412067533082,"_hasShrinkwrap":false},"1.2.0":{"name":"to-style","version":"1.2.0","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":{"ustring":"^1.4.0"},"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"],"_id":"to-style@1.2.0","dist":{"shasum":"11722284555f24ef51c15e1edd89e8db1b90edfb","size":7956,"noattachment":false,"key":"/to-style/-/to-style-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"directories":{},"publish_time":1411473778664,"_cnpm_publish_time":1411473778664,"_hasShrinkwrap":false},"1.1.0":{"name":"to-style","version":"1.1.0","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":{"ustring":"^1.1.0"},"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"],"_id":"to-style@1.1.0","dist":{"shasum":"ea12c2b37776f6302a8e7a122f7b9ab658b68760","size":7951,"noattachment":false,"key":"/to-style/-/to-style-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"directories":{},"publish_time":1409831390914,"_cnpm_publish_time":1409831390914,"_hasShrinkwrap":false},"1.0.2":{"name":"to-style","version":"1.0.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":{"ustring":"^1.1.0"},"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"],"_id":"to-style@1.0.2","dist":{"shasum":"75825d5c2e86650173251c0bd8ada3874924c49e","size":7234,"noattachment":false,"key":"/to-style/-/to-style-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.0.2.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"directories":{},"publish_time":1407329951441,"_cnpm_publish_time":1407329951441,"_hasShrinkwrap":false},"1.0.1":{"name":"to-style","version":"1.0.1","description":"Convert style objects to style strings","main":"index.js","scripts":{"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":{"ustring":"^1.1.0"},"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"],"_id":"to-style@1.0.1","dist":{"shasum":"493e4cf8d5ac072c2321f591742f4d1d29d9f062","size":5361,"noattachment":false,"key":"/to-style/-/to-style-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.0.1.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"directories":{},"publish_time":1407329459805,"_cnpm_publish_time":1407329459805,"_hasShrinkwrap":false},"1.0.0":{"name":"to-style","version":"1.0.0","description":"Convert style objects to style strings","main":"index.js","scripts":{"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":{"ustring":"^1.1.0"},"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"],"_id":"to-style@1.0.0","dist":{"shasum":"b9ed29b2e4cc85ef3124b35d329c5e6739a39368","size":5363,"noattachment":false,"key":"/to-style/-/to-style-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-style/download/to-style-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"radubrehar","email":"radu@evanghelic.ro"},"maintainers":[{"name":"radubrehar","email":"radu@evanghelic.ro"}],"directories":{},"publish_time":1407329329663,"_cnpm_publish_time":1407329329663,"_hasShrinkwrap":false}},"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```","_attachments":{},"homepage":"https://github.com/radubrehar/toStyle","bugs":{"url":"https://github.com/radubrehar/toStyle/issues"},"license":"MIT"}