{"_id":"node-balanced","_rev":"29-8ba953fc2b03c9c9638582631d8368a6","name":"node-balanced","description":"balanced string matching, and replacing.","dist-tags":{"latest":"0.0.14"},"versions":{"0.0.0":{"name":"node-balanced","version":"0.0.0","description":"allows you to replace the contents inside of your own balanced constraints.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","_id":"node-balanced@0.0.0","dist":{"shasum":"9cbfe297068c11e1f36bdc57971464ec436d0e4e","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.0.tgz","integrity":"sha512-aTYgHECDFJp+3IOnaflkKqFGvgLd+BoscmX5ruE3GKVUd5Zm+GpFt1VyA5FvNHFIB7SF5wh8D59c9Uikap1zzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGvoQXS6SEQYGINVj5deWty0HxSdCCIrGVnDNkdah8aTAiEAuOYg5leEdSb15KKb9EfIgqSgLevc8wvFqrzfB+sPsc8="}]},"_from":"node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.1":{"name":"node-balanced","version":"0.0.1","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.1","dist":{"shasum":"692ed6885b93dc0189e774417193c6fd551efa41","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.1.tgz","integrity":"sha512-c3MDpEv/VYf38ZpKYDsh1deN0aV4A3SMINSAx/uCk6YnCb8rKQ/LhM9fReDt33YL1Zd2nZZpzXf7vZ21M9Yi1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB/SUJW5rZOP0zOyTvuvnYKUMoV0sELO2viRvFA3flXAIgD1yyrnoF/FfKVDvrWLlBZm/aAH4yd3cB5zXfXf8/a+E="}]},"_from":"node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.2":{"name":"node-balanced","version":"0.0.2","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.2","dist":{"shasum":"048fcf19134ce10bbac83269321d061060da07f5","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.2.tgz","integrity":"sha512-9KjBqg3rUzVDlmt8mveVQ2v/DExlzBS2SCCkW8VkGlMuYp7xFnlzhIzri7iCeyFkKqxmwCRwQ3J7V1LW6J1Azw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqcGtGQIOih26LkCAkhwUsTzT0cVlDm4z4F0nm08+LGAiEA+zNOoAKt03ApnWtNeNdWlCNu6UKC3tsxiNA3WgdbDT8="}]},"_from":"node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.3":{"name":"node-balanced","version":"0.0.3","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"webpack index.js --output-file dist/balanced-min.js --output-library balanced --optimize-minimize; webpack index.js --output-file dist/balanced.js --output-library balanced"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.3","dist":{"shasum":"8efa33361060355716a8e15349cc655f2cb655c7","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.3.tgz","integrity":"sha512-1U08hhMJpouVSFTFUmypwHWc4VaVkg5DrmeRFb5vOz5Bl3gM5RFE6M+h6oQNYEBI9qUciYNiDikG6bqR5//NdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkKKU1+FQVrdJ4jkFJNLrivcKJC9tN86uLLExryBxZugIgWGtaMRNauYWtADgHJ67/rbN6qdOay6S4otASQP55H34="}]},"_from":"node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.6":{"name":"node-balanced","version":"0.0.6","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.6","dist":{"shasum":"4fc811decedd22335b5d51b0fa8af950027a0cb1","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.6.tgz","integrity":"sha512-BHav0LszpjklKipiR6Hivh9KQcmMh40Z6LSX0aB9h18pzyFql11Be+Bol/XxUgXs4lTtyQaqyjFSIrmqntjYjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWxpfRGd86q6lpN9nUK8m3jK7m8TvwaX4XhWjhkXnDNAiAMLISjM+8uT6kbOCQJkMHQ/FEOQBNUN7/hU4gONrZEZQ=="}]},"_from":"node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.7":{"name":"node-balanced","version":"0.0.7","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.7","dist":{"shasum":"6391c3d4f133e9e9d885ec74eba80dea58cb8fa3","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.7.tgz","integrity":"sha512-E5o+Sp9sPss1ZKJW8sleSlWntU59cIm3qXRjnT/hoCipAfTK8Mn1v9A+GTVsQOuRoHteUXn4ejD3V6ezDC1Ymg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICCGSru/OHJzlFixJ4j3JZp3V/Tdp1ebns+HFJnypoR4AiEAjbwEOkvfNaOmNTl5ucDx9TssREu/gfZkmmziGf4mFT4="}]},"_from":"node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.8":{"name":"node-balanced","version":"0.0.8","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.8","dist":{"shasum":"ce6c7f0ef32b6ce4aee3e5b1741dae14b8be4391","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.8.tgz","integrity":"sha512-cdUP99p2MVDrhKrwsJ4O3NnzsJwgaEDUKFi4WE9mpJ5uOOFMpVQwqVtcsx0gA7fwBncsTX/3PK/wYHR2BI7MXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7wuSa2+RqQpf9ummEbSO+VenywDtSFo/IxNfvrXNzrAiBosC25rI2regxydRpVibq3mHIvJx5PSSLqf7oC30wPfQ=="}]},"_from":"../node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.9":{"name":"node-balanced","version":"0.0.9","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.9","dist":{"shasum":"f07f150bbac7824b922ad8412ca1683dff77d7a4","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.9.tgz","integrity":"sha512-/TPsOs8sRhCltMmI5RfBdITn65dExRYQZu6O60JQXym3EiMTgFeJwxsiCw4cXvN1YsVtP7/lAhAxBynAntCopQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB4u3oMH/1Q5Yf4OLja98ok0SjFnz1Dlg5p54N8T5PFMAiBd+5xGIi2wzfuAHS/5XnYmEEu6rzya8D0hIOmj4uSsAw=="}]},"_from":"../node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.10":{"name":"node-balanced","version":"0.0.10","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.10","dist":{"shasum":"075b9ca17dd80d836d47bfcbe9b2b07ffbf67e20","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.10.tgz","integrity":"sha512-nXBdqiZaC9ecHYGemyeKo/dC+77laWAP4oMj+WI69gnvu2szL1ezSlLJhniMwhI0HxTDT46gNHLtD13nzOBbgg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtxGa/fJEr2rej3Had9hMNn64iIDxSN1C1L4AI21NGBQIhAMZPfCIDHeGRFmjY1PwW7c6JYMW9VlsTTlz9F6Aghsfo"}]},"_from":"../node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.11":{"name":"node-balanced","version":"0.0.11","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.11","dist":{"shasum":"40089d0be9fe6bd91627bf34ac7b107750fa7b0b","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.11.tgz","integrity":"sha512-3R4wxGcIv9XBfG4cu+2bqGYszo6IfwoHCd2fremGFYafXSNgo9toPtxwwotwU2LKKG8TFIr2cDcvVV/55S5n2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOOCLueO/mZWC0hNokCZi3pW1vzKdlB0YwcQ4IpmOneAIgDA0VKMpY3eCh67fFbChqoQDeCdh+fzNXNmNf3SMmw1M="}]},"_from":"../node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.12":{"name":"node-balanced","version":"0.0.12","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.12","dist":{"shasum":"f2e14cb1dd8f69beffe38cffef20e262b38abe97","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.12.tgz","integrity":"sha512-VUqfT89KNtKB4UsYPOAKon5TgYgLDNYwSRYnemNZWy+lRKfCtWP3hT2vFy9lWZNs2vYPYAlRuHRlCwgd5OrlRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFe4rPiVc/jl58KHdBbNat5SN6QDJ2rmJmulnjR/Zr8SAiEAg4W7rXBzzZ2Dec9ka6eBce/4Qq0vb016LWQZy5pM3vY="}]},"_from":"../node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.13":{"name":"node-balanced","version":"0.0.13","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.13","dist":{"shasum":"492365795db7eb571da2c6bbfd40397d03d99c50","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.13.tgz","integrity":"sha512-I3KArC/0WJeGpo/7K/70IPFyCm9yB+CaTXeCjO3pcvhJ3tx8cE0KrItXusSMqESvdu4sAa693awYdCoyYiaDPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdLmz6t03vsR0Kj8eh8AI2t7C2v5Hpu7ptZV7l/Nv4AAiBpRFaN1VHk6UEb2bXFLAY6EfdrvDsK16vN9SnAOBUfKA=="}]},"_from":"../node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]},"0.0.14":{"name":"node-balanced","version":"0.0.14","description":"balanced string matching, and replacing.","main":"index.js","scripts":{"test":"grunt test"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"license":"MIT","devDependencies":{"vows":"~0.7.0","grunt":"~0.4.5","webpack":"~1.3.2-beta9","webpack-dev-server":"~1.4.7","grunt-webpack":"~1.0.7","grunt-contrib-uglify":"~0.5.1","grunt-banner":"~0.2.3","grunt-contrib-jshint":"~0.10.0","grunt-contrib-watch":"~0.6.1","grunt-jasmine-node":"~0.2.1","grunt-cli":"~0.1.13"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"homepage":"https://github.com/icodeforlove/node-balanced","_id":"node-balanced@0.0.14","dist":{"shasum":"a33c727857d3044f1e88be72dd7d9a9d0b4fc21f","tarball":"https://registry.npmjs.org/node-balanced/-/node-balanced-0.0.14.tgz","integrity":"sha512-X0dI9P/OTETpHEqMpv4BRvlj6U0iLV+2YcKf8XayxGdEA86YpaCg8CnxgsD77YldxgY21tjOxRdCsSGLRfS2Ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGfNe3TnFMbkz8b4zyyzv+wc6679o1+13Ai9NoJqeSSAiB43Q4cTzS7pocqHP459gd406gOZt4ixeBJEFb/E52Ciw=="}]},"_from":"../node-balanced/","_npmVersion":"1.3.21","_npmUser":{"name":"icodeforlove","email":"chadvscira@gmail.com"},"maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}]}},"readme":"# Balanced [![Build Status](https://travis-ci.org/icodeforlove/node-balanced.png?branch=master)](https://travis-ci.org/icodeforlove/node-balanced)\n\nbalanced string matching, and replacing.\n\n# install\n\n```\nnpm install node-balanced\n```\n\n## example time\n\nlets say you have\n\n```css\n{\n\t@hello 1 {\n\t\ta {\n\t\t}\n\t}\n\t@hello 2 {\n\t\ta {\n\t\t}\n\t}\n\t@hello 3 {\n\t\ta {\n\t\t}\n\t}\n}\n```\n\nand you would like to replace the @hello block easily, balanced allows you to do this\n\n```javascript\nvar balanced = require('node-balanced');\n\nbalanced.replacements({\n\tsource: source,\n\thead: /@hello \\d \\{/, // optional (defalut: open)\n\topen: '{',\n\tclose: '}',\n\tbalance: false, // optional (default: false)\n\texceptions: false, // optional (default: false)\n\treplace: function (source, head, tail) {\n\t\treturn head + source + tail;\n\t}\n});\n```\n\nthis is a simple and efficient way to make balanced replacements, without a parser.\n\n## matching\n\nyou can get balanced matches by doing the following\n\n```javascript\nvar balanced = require('node-balanced');\n\nbalanced.matches({\n\tsource: source,\n\thead: /@hello \\d \\{/, // optional (defalut: open)\n\topen: '{',\n\tclose: '}',\n\tbalance: false, // optional (default: false) when set to true it will return `null` when there is an error\n\texceptions: false // optional (default: false),\n\tignore: [] // array of ignore ranges/matches\n});\n```\n\n## multiple head/open/close\n\nyou can match multiple head/open/close efficiently by doing this\n\n```javascript\nvar isBalanced = balanced.matches({\n\tsource: '{[({)]}}',\n\topen: ['{', '[', '('],\n\tclose: ['}', ']', ')'],\n\tbalance: true\n});\n```\n## ignore\nignore is supported by the `matches` and `replacements` methods, this is very useful for something like not matching inside of comments\n\n```\nvar blockComments = balanced.matches({source: source, open: '/*', close: '*/'}),\n\tsingleLineComments = balanced.getRangesForMatch(source, /^\\s*\\/\\/.+$/gim);\n\nbalanced.matches({\n\tsource: source,\n\thead: /@hello \\d \\{/,\n\topen: '{',\n\tclose: '}',\n\tignore: Array.prototype.concat.call([], blockComments, singleLineComments),\n\treplace: function (source, head, tail) {\n\t\treturn head + source + tail;\n\t}\n});\n```\n\n## advanced\n\nin this example we have code and we want to avoid replacing text thats inside of the multiline/singleline comments, and quotes\n\n```css\n{\n\t@hello 1 {\n\t\ta {\n\t\t}\n\t}\n/*\n\t@hello 2 {\n\t\ta {\n\t\t}\n\t}\n*/\n\t@hello 3 {\n\t\ta {\n\t\t}\n\t}\n// @hello 4 {}\n}\n\nvar hello = \"@hello 5 {}\";\n```\n\nwith balanced you can do this\n\n```javascript\n\t// returns quote ranges with option ignore filter\n\tfunction getQuoteRanges (string, ignore) {\n\t\tvar quotes = balanced.getRangesForMatch(string, new RegExp('\\'|\"', 'g'));\n\t\t\n\t\t// filter out ingored ranges\n\t\tif (ignore) {\n\t\t\tquotes = balanced.rangesWithout(quotes, ignore);\n\t\t}\n\n\t\tvar currect = null,\n\t\t\tranges = [];\n\t\n\t\tquotes.forEach(function (quote) {\n\t\t\tif (currect && currect.match === quote.match) {\n\t\t\t\t\tranges.push({\n\t\t\t\t\t\tindex: currect.index,\n\t\t\t\t\t\tlength: quote.index - currect.index + 1\n\t\t\t\t\t});\n\t\t\t\t\tcurrect = null;\n\t\t\t} else if (!currect) {\n\t\t\t\tcurrect = quote;\n\t\t\t}\n\t\t});\n\n\t\treturn ranges;\n\t}\n\n\tvar blockComments = balanced.matches({source: string, open: '/*', close: '*/'}),\n\t\tsingleLineComments = balanced.getRangesForMatch(string, /^\\s*\\/\\/.+$/gim),\n\t\tignores = Array.prototype.concat.call([], blockComments, singleLineComments),\n\t\tquotes = getQuoteRanges(string, ignores);\n\n\t// remove ignores inside of quotes\n\tignores = balanced.rangesWithout(ignores, quotes);\n\n\t// optional ignore code inside of quotes\n\tignores = ignores.concat(quotes);\n\t\n\t// run your matches or replacements method\n\tbalanced.matches({\n\t\tsource: string,\n\t\thead: /@hello \\d \\{/,\n\t\topen: '{',\n\t\tclose: '}',\n\t\tignore: ignores\n\t});\n```\n\nas you can see by using these principles you can accomplish this kind of stuff easily","maintainers":[{"name":"icodeforlove","email":"chadvscira@gmail.com"}],"time":{"modified":"2022-06-21T12:12:20.104Z","created":"2014-08-01T21:06:50.838Z","0.0.0":"2014-08-01T21:06:50.838Z","0.0.1":"2014-08-01T21:15:02.655Z","0.0.2":"2014-08-01T22:14:17.455Z","0.0.3":"2014-08-01T22:56:47.893Z","0.0.6":"2014-08-02T13:48:20.143Z","0.0.7":"2014-08-02T16:17:59.438Z","0.0.8":"2014-08-03T14:29:48.912Z","0.0.9":"2014-08-03T17:22:37.229Z","0.0.10":"2014-08-03T17:32:46.340Z","0.0.11":"2014-08-04T09:05:47.628Z","0.0.12":"2014-08-04T13:44:17.157Z","0.0.13":"2014-08-04T21:26:59.224Z","0.0.14":"2014-08-05T09:28:53.365Z"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/icodeforlove/node-balanced","repository":{"type":"git","url":"git://github.com/icodeforlove/node-balanced.git"},"author":{"name":"Chad Scira","email":"chadvscira@gmail.com"},"bugs":{"url":"https://github.com/icodeforlove/node-balanced/issues"},"users":{"burl.bn":true}}