
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ff-global
Advanced tools
npm install ff-global -S
import "ff-global/main"
import 'ff-global/renderer'
import 'ff-global/preload'
import util from 'ff-global/util'
注意:上面的使用方法必须在入口顶端引入,以保证全局使用
当上面正确引入后,系统会一个全局变量,主进程为global.ff,渲染进程为window.ff,在使用过程中可以直接使用ff
如判断对象为空对象的方法:ff.util.isEmptyObject({})
type ValueOf<T> = T[keyof T]
declare global {
namespace ff {
type MezzFileType = ValueOf<typeof MezzFileType>
type MqttStatus = ValueOf<typeof MqttStatus>
type LiveActionType = ValueOf<typeof LiveActionType>
//gc全局
namespace gc {
type KeyboardShortcut = Gc.KeyboardShortcut
type Client = Gc.Client
type Subscribes = Gc.Subscribes
}
}
var ff: {
MqttStatus: typeof MqttStatus
LiveActionType: typeof LiveActionType
env: typeof env
error: typeof error
util: Util
gc: ff.gc.Client
Ajax: typeof Ajax
//用户信息 store
userInfo: User.UserInfo | null
//cm列表
cmList: User.CMItem[]
browsers: { [id: string]: BrowserView } //打开的浏览器集合
currentBrowserTab?: WebContents //当 前显示的浏览器tab页
//当前浏览的account
current_account: null | f2.ServerAccount
//显示中的窗口
show_popup: {
[key: string]: boolean
}
//当前的tab页,位置
$tabId: number
}
namespace NodeJS {
interface Global {
mainWindow: BrowserWindow
}
}
}
declare global {
namespace Axios {
type Canceler = C
type RequestConfig = AxiosRequestConfig
}
namespace ff {
type MezzFileType = ValueOf<typeof MezzFileType>
type MqttStatus = ValueOf<typeof MqttStatus>
type LiveActionType = ValueOf<typeof LiveActionType>
//mqtt全局
namespace mqtt {
interface Subs {
[topic: string]: (...data: any) => void
}
}
//gc全局
namespace gc {
type KeyboardShortcut = Gc.KeyboardShortcut
type Client = Gc.Client
type IpcTopic = Gc.IpcTopic
type Subscribes = Gc.Subscribes
}
namespace country {
type CountryBase = CB
type Country = Co
}
namespace linkedin {
type AccountStatus = LinkedinAccount
type LiStatData = GetLiStatData
}
}
}
declare global {
var ff: Readonly<{
env: typeof env
MezzFileType: typeof MezzFileType //常量,mezz文件类型
MqttStatus: typeof MqttStatus
LiveActionType: typeof LiveActionType
Ajax: typeof Ajax
util: Util
error: typeof error
gc: typeof gc
mqtt: typeof mqtt
axios: AxiosStatic
nameSplit: NameSplit
dateTime: typeof DateTime
contactInfo: typeof ContactInfo
linkedin: Linkedin
country: CountryClass
analyzeText: {
company: AnalyzeText
contact: AnalyzeText
}
crawler: {
util: CrawlerUtil
db: CrawlerDb
}
}>
}
FAQs
Fieldflint 全局属性
The npm package ff-global receives a total of 14 weekly downloads. As such, ff-global popularity was classified as not popular.
We found that ff-global demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.