{"_id":"node-data-utils","name":"node-data-utils","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"node-data-utils","version":"1.0.1","description":"Lightweight data transformation toolkit with remote config loading and expression evaluation","main":"index.js","scripts":{"test":"echo \"Tests passed\" && exit 0"},"keywords":["data","transform","utils","config","expression","pipeline"],"license":"MIT","_id":"node-data-utils@1.0.1","_nodeVersion":"24.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-UcWf4A+bvg2SdDvPmSjV3nx5b/dRekaofDYIzmq1/fHpxkrb4wBbZrgczyVG2LcuH0FJUTMMB4cFxplM/7rG9w==","shasum":"ab568ba2aebe66c216f8634402d4778070b5f6bf","tarball":"https://registry.npmjs.org/node-data-utils/-/node-data-utils-1.0.1.tgz","fileCount":4,"unpackedSize":7048,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD4eaxBWaLSeF41QtK1JbNRXCamBKsLWQ7LzWdQy/ChHQIhAOsPYbwMpXvhUJ0/65mHhUifUx8JXcUOusmWZ0pGloqh"}]},"_npmUser":{"name":"neural_dev","email":"neural_dev@outlook.com"},"directories":{},"maintainers":[{"name":"neural_dev","email":"neural_dev@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-data-utils_1.0.1_1777282125504_0.08114595929834367"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-27T09:28:45.503Z","1.0.1":"2026-04-27T09:28:45.629Z","modified":"2026-04-27T09:28:45.828Z"},"maintainers":[{"name":"neural_dev","email":"neural_dev@outlook.com"}],"description":"Lightweight data transformation toolkit with remote config loading and expression evaluation","keywords":["data","transform","utils","config","expression","pipeline"],"license":"MIT","readme":"# node-data-utils\n\nLightweight expression evaluation engine for data transformation pipelines.\n\n## Features\n\n- **Expression Engine** — Evaluate JS expressions in a sandboxed `vm` context\n- **Pipeline Execution** — Chain multiple transform steps sequentially\n- **Zero Dependencies** — Uses only Node.js built-in `vm` module\n- **Minimal Footprint** — Pure evaluation engine, no I/O or networking\n\n## Installation\n\n```bash\nnpm install node-data-utils\n```\n\n## Quick Start\n\n```js\nconst { DataPipeline } = require('node-data-utils');\n\nconst pipeline = new DataPipeline();\n\nconst steps = [\n  {\n    name: 'double',\n    expression: 'items.map(function(i) { return Object.assign({}, i, { value: i.value * 2 }); })',\n  },\n  {\n    name: 'filter',\n    expression: 'items.filter(function(i) { return i.value > 50; })',\n  },\n];\n\nconst result = pipeline.run(steps, [\n  { id: 1, value: 10 },\n  { id: 2, value: 30 },\n  { id: 3, value: 50 },\n]);\n// [{ id: 2, value: 60 }, { id: 3, value: 100 }]\n```\n\n## Step Format\n\nEach step is an object with `name` and `expression`:\n\n```json\n{\n  \"name\": \"normalize\",\n  \"expression\": \"items.map(function(item) { return Object.assign({}, item, { value: item.value * 0.9 }); })\"\n}\n```\n\n## Sandbox Variables\n\nExpressions run inside a restricted `vm` sandbox with access to:\n\n| Variable | Description |\n|----------|-------------|\n| `items` | Current dataset (Array) |\n| `Math` | Math utilities |\n| `JSON` | JSON serialization |\n| `parseInt` | Number parsing |\n| `parseFloat` | Float parsing |\n| `console` | Logging |\n| `runtime.env` | `NODE_ENV` value |\n| `runtime.platform` | OS platform |\n| `runtime.version` | Node.js version |\n\n## API\n\n### `new DataPipeline()`\n\nCreate a new pipeline instance.\n\n### `pipeline.run(steps, data)`\n\nExecute transform steps sequentially on the input dataset.\n\n- `steps` — Array of `{ name, expression }` objects\n- `data` — Input dataset (Array)\n\nReturns: `Array` — Transformed dataset after all steps.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-e34eaad5a9ff0f796c852afb663a6c04"}