variable-manager
TypeScript icon, indicating that this package has built-in type declarations

1.2.10 • Public • Published

variable-manager

npm i variable-manager

import {VariableManager,Config} from "variable-manager";
let config = Config.Instance
Config.Instance.httpUrl = '/api'
Config.Instance.webSocket ='ws://192.168.18.31:8088/algmanager/ws'
let v = VariableManager.Instance

/**
	 * @description 初始化变量管理器
	 * @param parameter
	 * @param type 0,websocket直连 1,id 链接
	 * */
v.init({type:1,parameter:'2879100e-ad5f-4b0a-b82d-84709ffb3513'})
// initVariableList 在初始化前调用也可以在初始化后调用也可以
v.initVariableList([1, 2, 3, 4, 5, 6, 7, 8, 9], () => {
		console.log('123123132312')
	})
// 两种写法均可
v.setVariable({
    name: 'test',
    value:'testValue'
})
v.setVariable('test','testValue')

v.getVariable('test') // testValue 

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.100latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.100
1.2.90
1.2.80
1.2.70
1.2.60
1.2.50
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.170
1.1.160
1.1.150
1.1.140
1.1.130
1.1.120
1.1.110
1.1.100
1.1.90
1.1.80
1.1.70
1.1.61
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i variable-manager

Weekly Downloads

1

Version

1.2.10

License

ISC

Unpacked Size

199 kB

Total Files

17

Last publish

Collaborators

  • fffqqq