
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@chuxingpay/basic
Advanced tools
package contains general json data such as currency codes, bed types, facility type, bank list, branch/group list etc.
Syntax | Description | Sample |
---|---|---|
Bedmap | Bed Types | {"name": "其它", "nameEn": "Others", "code": "BT00", "bedCount": 1} |
BreakfastMap | Breakfast | {"name": "无早","nameEn": "No meals","code": 0} |
CurrencyMap | Currency Codes | {"name": "人民币","nameEn": "CNY","code": "CNY","symbol": "¥"} |
ErrorMap | Error Response Code | {"code": "-1","name": "服务器异常,建议稍后再试","nameEn": "Server abnormal, please try later"} |
HttpCodeMap | Http Status code | {"code": 200,"name": "请求成功","nameEn": "OK","description": "The request has succeeded."} |
FacilityMap | Facility Types | {"code": "FCT01", "name": "酒店设施", "nameEn": "Hotel Facilities", "icon": "cuIcon-check1"} |
PaymentMap | Payment Methods | {"code": "union","name": "银联","nameEn": "UnionPay"} |
PhotoMap | Photo Category | {"code": "PC01","name": "外景","nameEn": "Outdoor view"} |
PriceMap | Price Category | {"name": "付迅协议价","nameEn": "付迅协议价","code": "RT02"} |
UnitMap | Room Unit | {"name": "标准房","nameEn": "Standard","code": "RU01"} |
WifiMap | Wifi Category | {"name": "没有网络","nameEn": "No network","code": 0} |
WindowMap | Window Category | {"name": "无窗","nameEn": "No window","code": 0} |
GroupMap | Hotel Group (Search available) | {"name":"洲际","id":1,"src":"zhouJi","nameEn":"IHG"} |
GroupFull | Hotel Group | {"id":10193,"name":"亚朵","nameEn":"亚朵"} |
BrandMap | Hotel Brand | {"id":7,"name":"锦江","level":0,"nameEn":"Jinjiang"} |
npm i @chuxingpay/basic
// load multiple module
const { CurrencyMap, GroupMap, BrandMap } = require("@chuxingpay/basic");
// load single module (RECOMMENDED !!!)
const HttpCodeMap = require("@chuxingpay/basic/es/HttpCodeMap");
import FacilityMap from "@chuxingpay/basic/es/FacilityMap";
import { CurrencyMap, GroupMap, BrandMap } = from('@chuxingpay/basic')
console.log(CurrencyMap.list)
// output [ { "code": "", "name": "", "nameEn": "" }, ...rest ]
console.log(CurrencyMap.codes)
// output ['CNY', 'USD', ...rest ]
console.log(CurrencyMap.find('USD'))
// output [ { "name": "美元", "nameEn": "USD", "code": "USD", "symbol": "$" } ]
console.log(CurrencyMap.findOne('USD'))
// output { "name": "美元", "nameEn": "USD", "code": "USD", "symbol": "$" }
console.log(CurrencyMap.findOne('nil*'))
// output {}
console.log(GroupMap.list)
// output [ { "id": 0, "name": "", "nameEn": "", "src": "" }, ...rest ]
console.log(BrandMap.findByLevel(0))
// output [{"id": 0, "level": 0, "name": "", "nameEn": ""}]
FAQs
package contains general json data such as currency codes, bed types, facility type, bank list, branch/group list etc.
The npm package @chuxingpay/basic receives a total of 34 weekly downloads. As such, @chuxingpay/basic popularity was classified as not popular.
We found that @chuxingpay/basic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.