js 数据双向关联
Go to file
2022-01-30 02:59:34 +08:00
demo.js version 2022-01-30 02:59:29 +08:00
index.js version 2022-01-30 02:59:29 +08:00
LICENSE Initial commit 2022-01-30 01:08:39 +08:00
package.json 2.0.0-0 2022-01-30 02:59:34 +08:00
README.md beta 2022-01-30 01:14:45 +08:00

interrelated

js 数据双向关联


import fmhub from './index.js'

const fm = new fmhub()
const users = ["0001", '0002', "0003", "0004"]

// 一组用户全部订阅频道一
users.forEach((item) => {
  fm.set("频道一号", item)
})

// 操作所有订阅了频道一的用户
fm.atob("频道一号", (data) => {
  console.log(data)
})

fm.btoa("0002", (data) => {
  console.log(data)
})

// console print:
//
// 0001
// 0002
// 0003
// 0004
// 频道一号
//