
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
@jsepia/utils
Advanced tools
My utility library. Because some wheels still need to be reinvented.
import {isBrowser} from '@jsepia/utils'
if (isBrowser()) {
document.createElement('canvas')
}
import {IDGenerator} from '@jsepia/utils'
const catIDGenerator = new IDGenerator()
const dogIDGenerator = new IDGenerator()
function createCat(name) {
return {
id: catIDGenerator.generateID()
name: name,
toy: 'scratcher'
}
}
function createDog(name) {
return {
id: dogIDGenerator.generateID()
name: name,
toy: 'ball'
}
}
import {generateID} from '@jsepia/utils'
const entities = []
function spawnMonster() {
entities[generateID()] = new Monster()
}
function spawnNPC() {
entities[generateID()] = new NPC()
}
function getEntityType(id) {
if (entities[id] instanceof Monster) {
return 'monster'
}
else if (entities[id] instanceof NPC) {
return 'npc'
}
return 'unknown'
}
import {deepMerge} from '@jsepia/utils'
const defaults = {
targets: {
'app.js': 'src/**/*.js',
'tests.js': 'test/**/*.js'
},
verbose: false
}
const userPreferences = {
targets: {
'libs.js': 'lib/**/*.js'
}
}
const commandLineParams = {
verbose: true
}
const options = deepMerge(defaults, userPreferences, commandLineParams)
Output:
{
"targets": {
"app.js": "src/**/*.js",
"tests.js": "test/**/*.js",
"libs.js": "lib/**/*.js",
},
"verbose": true
}
import {buildUri} from '@jsepia/utils'
buildUri({
// it supports the basic options you would expect
protocol: 'http',
host: 'juliosepia.com',
port: '8080',
path: '/posts/util.html',
anchor: 'introduction', // hash
// you can pass credentials separately
user: 'jsepia',
password: 'hunter2',
// or as a single string
userInfo: 'jsepia:hunter2',
// you can pass query params separately
queryKey: {
version: '1.0',
format: 'html'
},
// or as a single string
query: 'version=1.0&format=html',
})
Output:
http://jsepia:hunter2@juliosepia.com:8080/posts/util.html?version=1.0&format=html#introduction
parseUri('http://jsepia:hunter2@juliosepia.com/posts/util.html?version=1.0&format=html#introduction')
Output:
{
"anchor": "introduction",
"authority": "jsepia:hunter2@juliosepia.com",
"directory": "/posts/",
"file": "util.html",
"host": "juliosepia.com",
"password": "hunter2",
"path": "/posts/util.html",
"port": "",
"protocol": "http",
"query": "version=1.0&format=html",
"queryKey": {
"format": "html",
"version": "1.0",
},
"relative": "/posts/util.html?version=1.0&format=html#introduction",
"source": "http://jsepia:hunter2@juliosepia.com/posts/util.html?version=1.0&format=html#introduction",
"user": "jsepia",
"userInfo": "jsepia:hunter2"
}
import {isValidUrl} from '@jsepia/utils'
const url = prompt('enter URL here')
if (isValidUrl(url)) {
request(url).then(
(response) => handleResponse,
(err) => handleError
)
}
else {
handleError(new Error(`Invalid URL: ${url}`))
}
Functions that make AJAX requests and return promises.
import {get} from '@jsepia/utils'
get(
'/api/posts',
{limit: 10, offset: 50},
'json'
)
.then(
(successfulResponse) => {
const posts = response.posts
posts.forEach((post) => {
renderPost(post)
})
},
(errorResponse) => {
if (errorResponse && errorResponse.errorMessage) {
throw new Error(errorResponse.errorMessage)
}
else {
throw new Error('Request failed')
}
}
)
FAQs
My utility library. Because some wheels are worth reinventing.
The npm package @jsepia/utils receives a total of 18 weekly downloads. As such, @jsepia/utils popularity was classified as not popular.
We found that @jsepia/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
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.