
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@m860/cerberus-babel-plugin-transform
Advanced tools
cerberus转换工具
npm i -D @m860/cerberus-babel-plugin-transform
NOTE:默认情况下
react,react-native会被替换
{
"plugins": ["@cerberus/transform"]
}
如果需要替换自己的模块可以设置modules参数
{
"plugins": [["@cerberus/transform",{"modules": ["dateformat"]}]]
}
NOTE:
modules中设置的module名字和npm保持一致,在Cerberus库中导出的名字也必须一致。
// input
import * as React from "react"
import React2 from "react"
import {memo,useState} from "react"
import {useRef as ur} from "react"
import {Text} from "react-native"
import df from "dateformat"
import {get as getPath} from "object-path"
// output
const React = $React$;
const React2 = $React$;
const memo = $React$.memo;
const useState = $React$.useState;
const ur = $React$.useRef;
const Text = $ReactNative$.Text;
const df = $Modules$["dateformat"];
const getPath = $Modules$["object-path"].get;
FAQs
cerberus转换工具
We found that @m860/cerberus-babel-plugin-transform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.