{"_id":"@aeroware/classify.js","_rev":"1-5839ad6965abf8239efc8ed9597b3f46","name":"@aeroware/classify.js","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aeroware/classify.js","version":"1.0.0","description":"Turn a string into a class!","main":"index.js","scripts":{"dev":"nodemon index.ts","test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","gitHead":"7b4bfd68003f445fe534bccad1182205f8a45130","_id":"@aeroware/classify.js@1.0.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-803nlK8J/sJzh48S7VgAJskjE1cYBITsCdHAiFup5DzL9KIbrPC9NcBPFLgMkbZEQeARonXx2J7HEUIw/CSFnA==","shasum":"26868d00168a38fd2bac2b086ac36e5383e8d9e1","tarball":"https://registry.npmjs.org/@aeroware/classify.js/-/classify.js-1.0.0.tgz","fileCount":5,"unpackedSize":8090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgToD5CRA9TVsSAnZWagAAnRoP/jRvu1e0JQGdbESBRez2\nM3bZ9QLYYbuLTdGvmk/LuLPLf6uRmowkT71WoYK/szcWVI3dH13HTaOcX8H1\nd7rWs5HdhWQ06MoW2CW+V/1++pa5UguLK6z6nomkBVxG37vsFu4obT/WYSDp\nIhLQiOiTfazbzfIjND5EWkn12V85H+Z+ZUqTpV6LFVbTGgc8TX3hLuzSgZjB\nC1y6YfdnrPaZOyMClwH67+y6uOAvxper8lx1mskeMLqAueiFIsDU5nxGvzWl\n4u/nta+Hx92IJBGdZ184+ZVnct1tKmwlpBBLVWcDFZjZFFQbOoYV8DIR7Bfw\n6mwCB8u+c2Im2VLEzm4ZgTql/nTAIP1w3rBbb9YZq3dlNC/hE+6Zths+Zc8f\nhxbhxesPAFHrC88P/g1pYkitHCHG+ZBAsWJ7Mcbq7RsQ6Obbe9L3AralTVr3\nn0cCCuIzl74fnwhB/4npiijXyOUSS2yDwsqaF489wgghAYEQeVPGDrUN1mSY\nd9oR8iiWwKw1dp33DKWCDq4hw9XueqwtIgvyLquoMy9qiAGbltCmpwKPQyj7\n1ztK6NU7MqfS5ynTJNTm4YPrjvWkShQydyxQitFK8Fi1SK7BSAVzqRDsMQ6Y\nA9Fx6LtheTjJ6wkJoWNmegp6TgvVcbKNmsY4AsN4Mv/twMbJ7lbPavxiIUJZ\npLOr\r\n=MElx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9zqubH2oiwAIFHJqfjwSHZG9bnqlBpMberxHlUP7dhgIhALwzBsMj3h+P4Hq9i7hN5qSqKBc+HKv6tzYaDkbhuDtj"}]},"_npmUser":{"name":"cursorspkg","email":"cursors.dev@gmail.com"},"directories":{},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"dheerajpv","email":"dheerajpv16@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/classify.js_1.0.0_1615757561181_0.8109427245564367"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-14T21:32:40.964Z","1.0.0":"2021-03-14T21:32:41.341Z","modified":"2022-04-04T11:49:29.600Z"},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"dheerajpv","email":"dheerajpv16@gmail.com"}],"description":"Turn a string into a class!","keywords":[],"license":"ISC","readme":"# classify.js\n\nTurn a string into a class!\n\nThe syntax of the format classify.js takes is very easy to learn.\n\nThe format goes something like this:\n\n```\nClassName [constructor parameters]\n    javascript code for the constructor\n\nproperty = value\n\nmethod [method parameters]\n    javascript code for the method\n\n...\n```\n\nclassify.js will ignore anything that it can't understand.\n\nWant a static property or method? Simply prefix the property or method with `+`. What about asynchronous methods? Prefix the method with `=`.\n\nThe `=` must go AFTER the `+` for it to work.\n\nParameters are separated by spaces inside the square brackets.\n\nHere is an example using everything that was mentioned:\n\n```js\nclassify`\nPerson [name age]\n    this.name = name;\n    this.age = age;\n\nsayHi []\n    console.log(this.name);\n\n+people = [];\n\ngetOlder []\n    this.age++;\n\n+=fetchData []\n    return fetch(\"a url\");\n`;\n```\n\nThis will produce the following class:\n\n```js\nclass Person {\n    constructor (name age) {\n        this.name = name;\n        this.age = age;\n    }\n\n    sayHi () {\n        console.log(this.name);\n    }\n\n    static people = [];\n\n    getOlder () {\n       this.age++;\n    }\n\n    static async fetchData () {\n        return fetch(\"a url\");\n    }\n}\n```\n","readmeFilename":"README.md"}