{"_id":"@allnulled/runtime","name":"@allnulled/runtime","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@allnulled/runtime","version":"1.0.0","description":"Spawns new processes from JavaScript functions.","main":"Runtime.js","scripts":{"test":"node test.js"},"keywords":[],"author":{"name":"allnulled"},"license":"WTFPL","gitHead":"58ec15844c5bddb5ae9c9089691a7b955f02408a","_id":"@allnulled/runtime@1.0.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-0ovxsLU0IJr6Q5pcp65a+i4t4pIaLpRp7v16GR04aUPMX++19DB/8tdzwlPxBBTazrg1QHIJmdwSxNRPudCuJA==","shasum":"af9aa19b7c75e243369964d264388013dde007aa","tarball":"https://registry.npmjs.org/@allnulled/runtime/-/runtime-1.0.0.tgz","fileCount":4,"unpackedSize":3752,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA6tSXYVVD3xW7d2HamtWRIPJEHcWt91wd0VGQNp8y8aAiEAikNkRDfH/LzprIWnHVNH9SGQH670a0HH6rLHuBN2BdE="}]},"_npmUser":{"name":"allnulled","email":"todosanulados@gmail.com"},"directories":{},"maintainers":[{"name":"allnulled","email":"todosanulados@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/runtime_1.0.0_1734509443633_0.2608226058727403"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-18T08:10:43.521Z","1.0.0":"2024-12-18T08:10:43.803Z","modified":"2024-12-18T08:10:44.081Z"},"maintainers":[{"name":"allnulled","email":"todosanulados@gmail.com"}],"description":"Spawns new processes from JavaScript functions.","keywords":[],"author":{"name":"allnulled"},"license":"WTFPL","readme":"# @allnulled/runtime\n\nSpawns new processes from JavaScript functions.\n\n## Installation\n\n```sh\nnpm i -s @allnulled/runtime\n```\n\n## Usage\n\nThis script spawns 3 different processes:\n\n```js\nconst Runtime = require(\"@allnulled/runtime\");\n\nRuntime.start(() => {\n    setInterval(() => {\n        console.log(\"go 1\");\n    }, 1000);\n});\n\nRuntime.start(() => {\n    setInterval(() => {\n        console.log(\"go 2\");\n    }, 1000);\n});\n\nRuntime.start(() => {\n    setInterval(() => {\n        console.log(\"go 3\");\n    }, 1000);\n});\n```\n\nThings to now:\n\n- The scripts are saved automatically under `runtimes` folder (from `process.cwd`), each of them with its own id.\n   - Change the second parameter to another path if you prefer other folder.\n- The functions (or callbacks, it does not matter) must not provide any parameter, as it is going to run in a separated different process.\n- The scripts are headed with events to remove the file itself when the process is over.","readmeFilename":"README.md"}