{"_id":"classname","_rev":"8-d6d4933111821f81b50196b6533ae3e7","name":"classname","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"classname","version":"0.0.0","keywords":["classname"],"author":{"name":"Gorm Casper"},"license":"ISC","_id":"classname@0.0.0","maintainers":[{"name":"casperin","email":"gcasper@gmail.com"}],"homepage":"https://github.com/casperin/classname","bugs":{"url":"https://github.com/casperin/classname/issues"},"dist":{"shasum":"43d171b484e354c7a293a5b78004df6852db20d6","tarball":"https://registry.npmjs.org/classname/-/classname-0.0.0.tgz","integrity":"sha512-kkhsspEJdUW+VhuvNzb2sQf0KbafDPfd36dB1qf03Uu42dWZwMQzaQuyNkaRr5ir0ZiAN0+TlH/EOOfwb/aaXg==","signatures":[{"sig":"MEUCIQDNeCNbJ+5QzhscZKTa/bdnSZJmaAOw/wXSIUmcI2wvCwIgP2lwEaiVVP/xO4Xp71oYq99P5QoM2wkCqvGsZkAWbpU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"classname.js","_from":".","_shasum":"43d171b484e354c7a293a5b78004df6852db20d6","gitHead":"9da34ef89cf2cbdcf3bc9974d11bb08c141124fe","scripts":{"test":"karma start spec/karma.conf.js"},"_npmUser":{"name":"casperin","email":"gcasper@gmail.com"},"repository":{"url":"https://github.com/casperin/classname.git","type":"git"},"_npmVersion":"2.0.0-alpha-5","description":"Easy configuration of class names","devDependencies":{"karma":"^0.12.31","karma-cli":"0.0.4","phantomjs":"^1.9.16","jasmine-core":"^2.2.0","karma-jasmine":"^0.3.5","karma-phantomjs-launcher":"^0.1.4"},"directories":{}}},"time":{"created":"2015-04-06T16:36:44.704Z","modified":"2025-06-27T10:11:26.733Z","0.0.0":"2015-04-06T16:36:44.704Z"},"bugs":{"url":"https://github.com/casperin/classname/issues"},"author":{"name":"Gorm Casper"},"license":"ISC","homepage":"https://github.com/casperin/classname","keywords":["classname"],"repository":{"url":"https://github.com/casperin/classname.git","type":"git"},"description":"Easy configuration of class names","maintainers":[{"name":"casperin","email":"gcasper@gmail.com"}],"readme":"# classname v.0.0.1\n\nSimple tool to build (and apply) classes. This is very much inspired by Jed Watson's [classnames](https://github.com/JedWatson/classnames), but with added functionality and slight differences in interface.\n\n## Install\n\nNpm: `npm install classname`\n\nOr just load `classname.js` in your browser, and call it directly.\n\n## Documentation\n\n```javascript\nclassname(1, 'one', false, 'two'); // '1 one two'\n\nclassname({\n    one: true,\n    two: false,\n    three: true\n});\n// 'one three'\n\nclassname(['one', 'two'], {one: false, three: true});\n// 'two three'\n```\n\nObjects always overwrite other types of parameters\n\n```javascript\nclassname({one: false}, ['one', 'two']);\n// 'two'\n```\n\n`classname` handles more than string, numbers, arrays, and objects though. You can give it elements, nodelists, or jQuery elements too.\n\n```javascript\nclassname(document.querySelectorAll('.foo'), 'bar');\n// 'foo bar' (assuming that the found elements do not have other class names as well)\n```\n\n`classname` can also set the class to the element for you. Use `.setTo()`:\n\n```javascript\nvar el = document.getElementById('foo');\n\nclassname.setTo(el)('one', 'two');\n\nel.className; // 'one two'\n```\n","readmeFilename":"README.md","users":{"shakakira":true,"piecioshka":true,"nguyenvanhoang26041994":true,"yang.shao":true}}