
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.
Load useful global functions and variables for server (nodejs, nextjs) and client (react).
Load useful global functions and variables for server (nodejs, nextjs) and client (react).
require('ygb') // load all global except bigger file size: ago() // all of "ygb/root" + log(), pc(), toFixed(), oa2o(), toUcSpace(), toDate(), lgTime(), uid(), modJson(), getFile(), hr
require('ygb/all') // load all global: all of "ygb" + ago()
require('ygb/root') // wait(), exit(), isNumber(), isString(), isArray(), isObject(), isEmpty(), stringify(), ucfirst(), fp(), yfp(), parse(),
import('ygb/client') // load all global except bigger file size: ago() // wait(), exit(), isArray(), isObject(), isEmpty(), stringify(), ucfirst(), parse(), fp(), yfp(), pc(), toUcSpace(), uid(), oa2o(), toFixed(), toDate(), lgTime() // abbr: 'ygb/c'
import('ygb/client/all') // load all global // abbr: 'ygb/c/all'
import('ygb/react') // all of "ygb/c" + react:useState(), useEffect(), <ObTree/> // same as 'ygb/client/react', 'ygb/c/react'
require('ygb/nx') // load all require('ygb'), with additional global functions // await getNxCookies();
require('ygb/s/wait') // wait() // for await wait()
require('ygb/s/exit') // exit(),stop(),X(),xx() // process.exit() abbr
require('ygb/s/stringify') // stringify(),sify() // same as JSON.stringify()
require('ygb/s/ucfirst') // ucFirst() // upper chase first character of a string
require('ygb/s/isNumber') // isNumber(),isNum() // chk if is a number or string number, including Inifnity and exponential: true: 1.2, '1.2', Inifnity, 1e8, '1e8'; false: [], {}
require('ygb/s/isString') // isString(),isStr() // const isStr = v => typeof v === "string" || v instanceof String;
require('ygb/s/isArray') // isArray(),isArr(),isAr() // same as Array.isArray()
require('ygb/s/isObject') // isObject(),isObj,isOb() // check plain object (not array, class, Date, ..)
require('ygb/s/isEmpty') // isEmpty() //return true: {} null undefined NaN "" [] false //return false:{ a: 1 } 123 "abc" true
require('ygb/s/toUcSpace') // toUcSpace(),ucSpace() // mod space into unicode "\u00A0"
require('ygb/r/log') // log(),log., lg(),lg., toc., out(), inspect(), insp(), W(), warn(), warning(), E(), err(), error(), // require("ylg").gb()
require('ygb/r/fp') // fp(),num(),toNum() // floating point
require('ygb/r/yfp') // yfp() // floating point (16 precision, floor)
require('ygb/r/pc') // pc(),prec(),toprecision(),toPrecision() // precision
require('ygb/r/toFixed') // tofixed with ceil and floor
require('ygb/r/oa2o') // object array to array
require('ygb/r/parse') // parse(),toObject(),toObj(),toOb() // same as JSON.parse()
require('ygb/r/lgTime') // lgTime(),logTime() // log time at interval
require('ygb/r/toDate') // timestamp to date
require('ygb/r/ago') // ago(),timeAgo() // timestamp to time ago
require('ygb/r/uid') // uid() // get unqiue id // <div key={uid()}>
require('ygb/r/react') // useState(), useEffect()
require('ygb/r/react-obtree') // <ObTree label='tx' data={ob} />
require('ygb/r/modJson') // modJson(),modFile()
require('ygb/r/getFile') // getFile(),loadFile()
require('ygb/v/hr') // draw a line in terminal
All abbr is avaialble when loading the global category (refer to individual for abbr)
Most of the loaded function usage can refer to the source code and https://www.npmjs.com/~jydev
ygb stands for "Y global"
FAQs
Load useful global functions and variables for server (nodejs, nextjs) and client (react).
We found that ygb 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.