UNPKG

@chuxingpay/basic

Version:

package contains general json data such as currency codes, bed types, facility type, bank list, branch/group list etc.

26 lines (19 loc) 514 B
"use strict"; function GroupMap() { var data = require("../lib/GroupMap.json"); Object.defineProperty(this, "list", { configurable: false, enumerable: true, get: function get() { return data; } }); this.find = function (name) { return data.filter(item => Object.values(item).indexOf(name) !== -1); }; this.findOne = function (name) { return data.find(item => Object.values(item).indexOf(name) !== -1) || {}; }; return this; }; module.exports = new GroupMap();