
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Internal utilities for mako and plugins.
These utilities are used by mako core and plugins internally, but they may be useful to other plugin developers.
Takes the given to
absolute path and gives the relative path from pwd.
NOTE: pwd is cached from startup, so this assumes that cwd never changes.
Takes the given input
(string/buffer) and returns the actual size in a
human-friendly format.
The raw
argument can be passed to return the size in a raw Number
reflecting
the number of bytes.
Takes the given numbers for a
and b
, computes the delta from a -> b
and
returns a human-friendly string showing the change.
For example:
console.log(sizeDiff(1000, 1500))
// 1 kB → 1.5 kB (+50%)
console.log(sizeDiff(1000, 250))
// 1 kB → 250 B (-75%)
Used for timing code with process.hrtime()
. A function is returned that will
return the time elapsed since the timer was created. (in a human-friendly
format)
let timer = utils.timer()
// do stuff...
console.log('finished doing stuff (took %s)', timer())
The returned function has an optional raw
argument. When set to true
, it
will instead return the time elapsed in the raw hrtime array format.
FAQs
Internal utilities for mako and plugins.
The npm package mako-utils receives a total of 3 weekly downloads. As such, mako-utils popularity was classified as not popular.
We found that mako-utils 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.
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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.