{"_id":"@risingstack/nx-compile","_rev":"31-078d1fb365b04a98dc935ff6abeeaa03","name":"@risingstack/nx-compile","description":"Execution of string as code in the context of an object, similarly to Object.eval().","dist-tags":{"latest":"4.2.0"},"versions":{"1.0.0":{"name":"@risingstack/nx-compile","version":"1.0.0","description":"Execution of strings as code in a secure, sandboxed environment.","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","sandbox","eval","execution"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"b0e41e76c5f5374a864da90c06a3f264e88fbfc8","_id":"@risingstack/nx-compile@1.0.0","_shasum":"688138c5cd01d8d878251471170ca97b226d5b03","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},"dist":{"shasum":"688138c5cd01d8d878251471170ca97b226d5b03","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-1.0.0.tgz","integrity":"sha512-hNOqmjoxwFRRJbuTFXK4u+HbhEwacVFf7x0IGSstcJJaRs/iSwqcocT2x2LItdc3vnRpcpPnq65htHGcovCeNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmFdnV4DadFPf/PITnmJE1IVl4YWxFsHTL2rbkZVhvgAiBk4NaTEpftlP4Nuu00BDx3A2mH5ka4ed6u9GPzIwSk3Q=="}]},"maintainers":[{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/nx-compile-1.0.0.tgz_1465317836013_0.16083146771416068"},"directories":{}},"1.0.1":{"name":"@risingstack/nx-compile","version":"1.0.1","description":"Execution of strings as code in a secure, sandboxed environment.","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","sandbox","eval","execution"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"d19612f2d9a6debf45172294e78d488b7a85cc11","_id":"@risingstack/nx-compile@1.0.1","_shasum":"697d030958a812203fce4d3ddf67405efaebfbe8","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},"dist":{"shasum":"697d030958a812203fce4d3ddf67405efaebfbe8","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-1.0.1.tgz","integrity":"sha512-OjQYLSMFC8Rv+ekf/b1VcbPZHjBXWsi+mwDFza7CqoeCSS9VKl2loL5Lx9qs6B7Hgz5KdybB9xO2mApQQelEzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEc9QcWh9/nc9W2bcIHd3eYIiuHW59liyTEGf8uPINjsAiB9pnS4vdVFmJsoxG0hUodNDVr9XQFR20GylGJ04OD/Lw=="}]},"maintainers":[{"name":"abelerdesz","email":"abelerdesz@gmail.com"},{"name":"aodev","email":"kevin.purnelle@gmail.com"},{"name":"gergelyke","email":"mail@nemethgergely.com"},{"name":"hekike","email":"peter@risingstack.com"},{"name":"midiparse","email":"david.szakallas@gmail.com"},{"name":"ozonid","email":"david@risingstack.com"},{"name":"peteyycz","email":"p.czibik@gmail.com"},{"name":"risingnpm","email":"info@risingstack.com"},{"name":"shadowbeetle","email":"tamas.kadlecsik@gmail.com"},{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},{"name":"tamas.hodi","email":"tamas.hodi89@gmail.com"},{"name":"tothandras","email":"andras.toth@risingstack.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nx-compile-1.0.1.tgz_1467578284778_0.1710281919222325"},"directories":{}},"1.0.2":{"name":"@risingstack/nx-compile","version":"1.0.2","description":"Execution of strings as code in a secure, sandboxed environment.","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","sandbox","eval","execution"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"bcc5168758aaefbe54f489c3a0af897cc1829cea","_id":"@risingstack/nx-compile@1.0.2","_shasum":"75d64071409eade344ba1dc1a74dc54d727c8a9d","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},"dist":{"shasum":"75d64071409eade344ba1dc1a74dc54d727c8a9d","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-1.0.2.tgz","integrity":"sha512-2IVN9UMhmvnQiprkFLhDq1P4BpUZB5TewqcrJJU8FlpNxkaQQOMYmdPdBME/49IJHxliYngFrCgvrhsn7CD1Eg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2eu68ZV04ErDbaB1onAssxkqdPamIjm1RUnf1WR5TQAIgJWU2ipaUnm8cADsi5+1OrXpVExSO3h5YjKu6UHf3rf4="}]},"maintainers":[{"name":"abelerdesz","email":"abelerdesz@gmail.com"},{"name":"aodev","email":"kevin.purnelle@gmail.com"},{"name":"gergelyke","email":"mail@nemethgergely.com"},{"name":"hekike","email":"peter@risingstack.com"},{"name":"midiparse","email":"david.szakallas@gmail.com"},{"name":"ozonid","email":"david@risingstack.com"},{"name":"peteyycz","email":"p.czibik@gmail.com"},{"name":"risingnpm","email":"info@risingstack.com"},{"name":"shadowbeetle","email":"tamas.kadlecsik@gmail.com"},{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},{"name":"tamas.hodi","email":"tamas.hodi89@gmail.com"},{"name":"tothandras","email":"andras.toth@risingstack.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nx-compile-1.0.2.tgz_1471442846286_0.2493479112163186"},"directories":{}},"2.0.0":{"name":"@risingstack/nx-compile","version":"2.0.0","description":"Execution of strings as code in a sandboxed environment with optional security.","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","sandbox","eval","execution"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"dc7a0328043977afd5a91723440b9b1437bf36ed","_id":"@risingstack/nx-compile@2.0.0","_shasum":"a9ac5f587bdd3a166530f47bf2ee67a050acd2ed","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan@risingstack.com"},"dist":{"shasum":"a9ac5f587bdd3a166530f47bf2ee67a050acd2ed","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-2.0.0.tgz","integrity":"sha512-RjzPaZRM3qEZVRbA2w64vtPGMKgQCRAImiLeqfSndoCw5uuZNOneRbXG9mnuHj/wqph1LiIIIMk+fVPPaahSDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtaEvfEFygKm6idz/yo6tJ/rAGiSEHGJV7oCrwAQR7tAIhALI16Hj5K/awU3JnEmIlMiICvW0tVJjxaDc+WQH69j0b"}]},"maintainers":[{"name":"abelerdesz","email":"abelerdesz@gmail.com"},{"name":"aodev","email":"kevin.purnelle@gmail.com"},{"name":"gergelyke","email":"mail@nemethgergely.com"},{"name":"hekike","email":"peter@risingstack.com"},{"name":"midiparse","email":"david.szakallas@gmail.com"},{"name":"ozonid","email":"david@risingstack.com"},{"name":"peteyycz","email":"p.czibik@gmail.com"},{"name":"risingnpm","email":"info@risingstack.com"},{"name":"shadowbeetle","email":"tamas.kadlecsik@gmail.com"},{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},{"name":"tamas.hodi","email":"tamas.hodi89@gmail.com"},{"name":"tothandras","email":"andras.toth@risingstack.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nx-compile-2.0.0.tgz_1472992343083_0.5642235474660993"},"directories":{}},"3.0.0":{"name":"@risingstack/nx-compile","version":"3.0.0","description":"Execution of strings as code in a sandboxed environment with optional security.","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","sandbox","eval","execution"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"2555a5180940f994f0539dedc616b2917e2d31f8","_id":"@risingstack/nx-compile@3.0.0","_shasum":"ccd84d32467704727fc91729b3c9edf22c85e255","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan@risingstack.com"},"dist":{"shasum":"ccd84d32467704727fc91729b3c9edf22c85e255","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-3.0.0.tgz","integrity":"sha512-FcaEtdMpmuYObk0Ux0dDPmP5V1LwK3KjvOejbf1pvSG4E84ODlZ0nKyiogy1dnhaWY15A8xKZbQdhxDoc4ksOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHHuk0CDN7ip1izxB9NJzOLFbdrI8ysnB9ZitRe+ZYprAiEAhc/SkmQaTBYlmGOr659BVUFR7ITMxuMbuYJJtxAMjf8="}]},"maintainers":[{"name":"abelerdesz","email":"abelerdesz@gmail.com"},{"name":"aodev","email":"kevin.purnelle@gmail.com"},{"name":"gergelyke","email":"mail@nemethgergely.com"},{"name":"hekike","email":"peter@risingstack.com"},{"name":"midiparse","email":"david.szakallas@gmail.com"},{"name":"ozonid","email":"david@risingstack.com"},{"name":"peteyycz","email":"p.czibik@gmail.com"},{"name":"risingnpm","email":"info@risingstack.com"},{"name":"shadowbeetle","email":"tamas.kadlecsik@gmail.com"},{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},{"name":"tamas.hodi","email":"tamas.hodi89@gmail.com"},{"name":"tothandras","email":"andras.toth@risingstack.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nx-compile-3.0.0.tgz_1476812172644_0.7368666871916503"},"directories":{}},"4.0.0":{"name":"@risingstack/nx-compile","version":"4.0.0","description":"Execution of string as code in the context of an object, similarly to Object.eval().","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","context","eval","execution","code"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"4eb00aaded4685c27e38fff333569506f124ccd6","_id":"@risingstack/nx-compile@4.0.0","_shasum":"c267061d58c4de54bec7b0cc3a614b9448dc1a7b","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan@risingstack.com"},"dist":{"shasum":"c267061d58c4de54bec7b0cc3a614b9448dc1a7b","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-4.0.0.tgz","integrity":"sha512-3borFPzjP111VoC5MqJ5iJd7iTqI5ZEWU4hYgdysKfYNsXegxqQS6fmjfZLua3berjRX5lo9IsMiMeOEZethZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcWSBmZgWOeabc9upDGWtKqhYs8OiBKE/cB5m+Vy9a2AiAZy/xFZMopY+h2/pYD/qVQd/LKS0SimEs4ZM2NDq3yCg=="}]},"maintainers":[{"name":"abelerdesz","email":"abelerdesz@gmail.com"},{"name":"aodev","email":"kevin.purnelle@gmail.com"},{"name":"gergelyke","email":"mail@nemethgergely.com"},{"name":"hekike","email":"peter@risingstack.com"},{"name":"midiparse","email":"david.szakallas@gmail.com"},{"name":"ozonid","email":"david@risingstack.com"},{"name":"peteyycz","email":"p.czibik@gmail.com"},{"name":"risingnpm","email":"info@risingstack.com"},{"name":"shadowbeetle","email":"tamas.kadlecsik@gmail.com"},{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},{"name":"tamas.hodi","email":"tamas.hodi89@gmail.com"},{"name":"tothandras","email":"andras.toth@risingstack.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nx-compile-4.0.0.tgz_1479841740718_0.6628849054686725"},"directories":{}},"4.1.0":{"name":"@risingstack/nx-compile","version":"4.1.0","description":"Execution of string as code in the context of an object, similarly to Object.eval().","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","context","eval","execution","code"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"0189b9c0fa77bb3d3ecc1a39eaa6c2d4a758c8bc","_id":"@risingstack/nx-compile@4.1.0","_shasum":"b47d4f9ac6257e423b426a360a96491a04a50f0d","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan@risingstack.com"},"dist":{"shasum":"b47d4f9ac6257e423b426a360a96491a04a50f0d","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-4.1.0.tgz","integrity":"sha512-xuvWliL7+RI+PTTF3PfZX1kRLrnGxqnHLftnjVwA+LBQKCP54Wnn3W6GnKAqSNVqKMsPCHdVxJRqR4Cay4j86w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPtkQvurG2vgfHn+EBoLeZAvj25oz+gN8JVzYXRJwcHwIgaOQRbTqLp0sf5loM5ImVAT060g3z4AP8nhazxHvnycg="}]},"maintainers":[{"name":"abelerdesz","email":"abelerdesz@gmail.com"},{"name":"aodev","email":"kevin.purnelle@gmail.com"},{"name":"gergelyke","email":"mail@nemethgergely.com"},{"name":"hekike","email":"peter@risingstack.com"},{"name":"midiparse","email":"david.szakallas@gmail.com"},{"name":"ozonid","email":"david@risingstack.com"},{"name":"peteyycz","email":"p.czibik@gmail.com"},{"name":"risingnpm","email":"info@risingstack.com"},{"name":"shadowbeetle","email":"tamas.kadlecsik@gmail.com"},{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},{"name":"tamas.hodi","email":"tamas.hodi89@gmail.com"},{"name":"tothandras","email":"andras.toth@risingstack.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/nx-compile-4.1.0.tgz_1479939144918_0.7189160247799009"},"directories":{}},"4.2.0":{"name":"@risingstack/nx-compile","version":"4.2.0","description":"Execution of string as code in the context of an object, similarly to Object.eval().","main":"compiler.js","scripts":{"test":"mocha compiler.test.js","lint":"standard compiler.js"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"homepage":"https://github.com/RisingStack/nx-compile#readme","license":"MIT","keywords":["nx","compile","context","eval","execution","code"],"devDependencies":{"chai":"3.5.0","mocha":"2.5.3","standard":"7.1.2","pre-push":"0.1.1"},"engines":{"node":">=6.0.0"},"pre-push":["lint","test"],"gitHead":"04eab3102a93032dace6c878e292c5bad9caf37d","_id":"@risingstack/nx-compile@4.2.0","_shasum":"1d473b5504097627f990a24fe0723bcec94dc814","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"solkimicreb","email":"miklos.bertalan@risingstack.com"},"dist":{"shasum":"1d473b5504097627f990a24fe0723bcec94dc814","tarball":"https://registry.npmjs.org/@risingstack/nx-compile/-/nx-compile-4.2.0.tgz","integrity":"sha512-z4/XOq0eXoM+4uSLaXRLnE3m9uidFsffuqg4qK0HQ0ZVcSsx5OzfG1WL2THuhszy1AjS8zpUY8IQP+4UxqF6BA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYHtfPrc/0PFrzjB0wwRARniH4wzLKNv32ZVy3dmgWqAiEA1tyWOtJefYV1FyyfCYWh15D6IweVA7neSwt7GUVN44M="}]},"maintainers":[{"name":"abelerdesz","email":"abelerdesz@gmail.com"},{"name":"aodev","email":"kevin.purnelle@gmail.com"},{"name":"gergelyke","email":"mail@nemethgergely.com"},{"name":"hekike","email":"peter@risingstack.com"},{"name":"midiparse","email":"david.szakallas@gmail.com"},{"name":"ozonid","email":"david@risingstack.com"},{"name":"peteyycz","email":"p.czibik@gmail.com"},{"name":"risingnpm","email":"info@risingstack.com"},{"name":"shadowbeetle","email":"tamas.kadlecsik@gmail.com"},{"name":"solkimicreb","email":"miklos.bertalan1@gmail.com"},{"name":"tamas.hodi","email":"tamas.hodi89@gmail.com"},{"name":"tothandras","email":"andras.toth@risingstack.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/nx-compile-4.2.0.tgz_1481565145618_0.7665405303705484"},"directories":{}}},"readme":"# nx-compile\n\nThis library is part of the [NX framework](http://nx-framework.com).\n\nThe purpose of this library is to allow the execution of strings as code in the\ncontext of an object. It combines ES6 Proxies with the JavaScript `with` keyword to achieve this.\n\n## Installation\n\n```\n$ npm install @risingstack/nx-compile\n```\n\n## Platform support\n\n- Node: 6 and above\n- Chrome: 49 and above (after browserified)\n- Firefox: 38 and above (after browserified)\n- Safari: 10 and above (after browserified)\n- Edge: 12 and above (after browserified)\n- Opera: 36 and above (after browserified)\n- IE is not supported\n\n## Usage\n\n```js\nconst compiler = require('@risingstack/nx-compile')\n```\n\n## API\n\n### compiler.compileCode(String)\n\nThis method creates a function out of a string and returns it. The returned function takes\nan object as argument and executes the string as code in the context of the passed object.\nThe string can be any valid javascript code.\n\n```js\nconst code = compiler.compileCode('return prop1 + prop2')\nconst sum = code({prop1: 1, prop2: 2}) // sum is 3\n```\n\nThe returned function also accepts a second object argument, that may contain temporary variables.\nTemporary variables are added to the context object while the code is executing and removed after.\nThey are favored over the permanent context variables.\n\n```js\nconst code = compiler.compileCode('return prop1 + prop2')\nconst context = {prop1: 1, prop2: 2}\nconst temporary = {prop1: 2}\nconst sum = code(context, temporary) // sum is 4, context is still {prop1: 1, prop2: 2}\n```\n\n### compiler.compileExpression(String)\n\nThis method creates a function out of a string and returns it. The returned function takes\nan object as argument and executes the string as an expression in the context of the passed object.\nIt returns the result of the evaluated expression. The string can be any javascript expression\nthat may come after a return statement.\n\n```js\nconst expression = compiler.compileExpression('prop1 || prop2')\nconst result = expression({prop2: 'Hello'}) // result is 'Hello'\n```\n\nExpressions return undefined instead of throwing a TypeError on invalid property access.\nThis allows lazy initialization of your data.\n\n```js\nconst expression = compiler.compileExpression('item.name')\nconst context = {}\n\nlet result = expression(context) // result is undefined, no error is thrown\n\ncontext.item = {name: 'item name'}\nresult = expression(context) // result is 'item name'\n```\n\n### compiler.expose(String, String, String, ...)\n\nUse this method to expose globals to the compiler. Non of the globals are exposed by default.\n\n```js\nconst code = compiler.compileCode('console.log(Math.round(num))')\ncompiler.expose('console', 'Math')\ncode({num: 1.8}) // logs 2 to the console\n```\n\nContext variables are always favored over global ones, when both are present (with the same name).\n\n### compiler.hide(String, String, String, ...)\n\nUse this method to hide exposed globals from the compiler.\n\n```js\nconst code = compiler.compileCode('console.log(Math.round(num))')\ncompiler.expose('console', 'Math')\ncode({num: 1.8}) // logs 2 to the console\ncompiler.hide('console', 'Math')\ncode({num: 1.8}) // throws an error, console and Math are undefined\n```\n\nContext variables are always favored over global ones when both are present (with the same name).\n\n## Example\n\n```js\nconst compiler = require('@risingstack/nx-compile')\n\ncompiler.expose('console')\nconst context = {name: 'nx-compile'}\nconst tempVars = {version: '4.2.0'}\nconst code = compiler.compileCode('console.log(name + version)')\n\ncode(context, tempVars) // outputs 'nx-compile4.2.0' to console\n```\n\n## Contributions\n\nThis library has the very specific purpose of supporting the\n[NX framework](https://github.com/RisingStack/nx-framework).\nFeatures should only be added, if they are used by the framework. Otherwise please fork.\n\nBug fixes, tests and doc updates are always welcome.\nTests and linter (standardJS) must pass.\n\n## Authors\n\n  - [Miklos Bertalan](https://github.com/solkimicreb)\n\n# License\n\n  MIT\n","maintainers":[{"email":"kubischj@windowslive.com","name":"kubischj"},{"email":"fwalkwithm@gmail.com","name":"fwalkwithm"},{"email":"david@risingstack.com","name":"ozonid"},{"email":"simonzsoltjota@gmail.com","name":"jota"},{"email":"dandesz198@gmail.com","name":"dandesz198"},{"email":"diana.pal@risingstack.com","name":"paldiana01"},{"email":"info@risingstack.com","name":"risingnpm"},{"email":"mail@nemethgergely.com","name":"gergelyke"},{"email":"email@martonpeter.com","name":"hekike"},{"email":"p.czibik@gmail.com","name":"peteyycz"},{"email":"tamas.hodi89@gmail.com","name":"tamas.hodi"},{"email":"miklos.bertalan@risingstack.com","name":"solkimicreb"}],"time":{"modified":"2022-06-12T23:14:47.120Z","created":"2016-06-07T16:43:57.954Z","1.0.0":"2016-06-07T16:43:57.954Z","1.0.1":"2016-07-03T20:38:07.397Z","1.0.2":"2016-08-17T14:07:28.211Z","2.0.0":"2016-09-04T12:32:25.025Z","3.0.0":"2016-10-18T17:36:14.324Z","4.0.0":"2016-11-22T19:09:02.674Z","4.1.0":"2016-11-23T22:12:25.486Z","4.2.0":"2016-12-12T17:52:26.181Z"},"homepage":"https://github.com/RisingStack/nx-compile#readme","keywords":["nx","compile","context","eval","execution","code"],"repository":{"type":"git","url":"git+ssh://git@github.com/RisingStack/nx-compile.git"},"author":{"name":"Miklos Bertalan","email":"miklos.bertalan@risingstack.com"},"bugs":{"url":"https://github.com/RisingStack/nx-compile/issues"},"license":"MIT","readmeFilename":"README.md"}