UNPKG

@szmg-fe/tarco

Version:

function library in Taro

14 lines (11 loc) 397 B
/* * @Description: getKeyFromUrl * @Date: 2021-04-07 16:02:22 * @Author: Lemon * @LastEditTime: 2021-04-21 14:17:52 */ import prop from "@szmg-fe/funba/prop"; import { compose } from "@szmg-fe/funba/ramda"; import getCurrentInstance from "./getCurrentInstance"; const getKeyFromUrl = (key: string) => compose(prop(`router.params.${key}`), getCurrentInstance); export default getKeyFromUrl;