{"id":21285656,"url":"https://github.com/neutroniumcore/neutronium-vm-loader","last_synced_at":"2026-05-02T05:03:35.696Z","repository":{"id":145489711,"uuid":"114706094","full_name":"NeutroniumCore/neutronium-vm-loader","owner":"NeutroniumCore","description":"Utility to load neutronium ViewModel from cjson file","archived":false,"fork":false,"pushed_at":"2023-03-01T12:32:13.000Z","size":339,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T07:40:18.746Z","etag":null,"topics":["json","neutronium"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NeutroniumCore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-19T01:44:01.000Z","updated_at":"2020-04-26T17:15:58.000Z","dependencies_parsed_at":"2023-03-25T09:31:11.713Z","dependency_job_id":null,"html_url":"https://github.com/NeutroniumCore/neutronium-vm-loader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2Fneutronium-vm-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2Fneutronium-vm-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2Fneutronium-vm-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2Fneutronium-vm-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeutroniumCore","download_url":"https://codeload.github.com/NeutroniumCore/neutronium-vm-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746210,"owners_count":20341203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","neutronium"],"created_at":"2024-11-21T11:21:40.710Z","updated_at":"2026-05-02T05:03:35.634Z","avatar_url":"https://github.com/NeutroniumCore.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neutronium vm loader\n\n[![Build status](https://img.shields.io/circleci/project/github/NeutroniumCore/neutronium-vm-loader.svg)](https://circleci.com/gh/NeutroniumCore/neutronium-vm-loader)\n[![Npm version](https://img.shields.io/npm/v/neutronium-vm-loader.svg?maxAge=2592000)](https://www.npmjs.com/package/neutronium-vm-loader)\n[![MIT License](https://img.shields.io/github/license/NeutroniumCore/neutronium-vm-loader.svg)](https://github.com/NeutroniumCore/neutronium-vm-loader/blob/master/LICENSE)\n\nUtility to parse [Neutronium](https://github.com/David-Desmaisons/Neutronium) generated `cjson` into javascript object. Used by [neutronium-vue](https://github.com/NeutroniumCore/neutronium-vue).\n\nVm loader is intendent to load data in design mode when using Neutronium.\nIt is helpful when you design your solution decontected from C# back-end. \n\n## Typical use:\n```javascript\nimport rawVm from '../data/vm'\nimport { createVM } from 'neutronium-vm-loader'\n\nconst vm = createVM(rawVm);\n```\n\n## Listen to command and return a value (for ResultCommand):\n\n```javascript\nimport { Command } from 'neutronium-vm-loader'\n\nfunction commandListener(commandId, ...commandArguments) {\n  if (commandId === 12) {\n    return new Promise( //..\n    );\n  }\n}\n\nCommand.listen(commandListener);\n```\n\nCommand listen function is called with the command is as a first paremeter and the arguments which with the command has been called.\nlisten return will be used by as the command result.\nThe command id is set incrementally for each command of a view model. \n\n## Installation\n\n```\nnpm install --save neutronium-vm-loader\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneutroniumcore%2Fneutronium-vm-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneutroniumcore%2Fneutronium-vm-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneutroniumcore%2Fneutronium-vm-loader/lists"}