Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@apitizer/query
Advanced tools
The query package of apitizer aims for a chainable and flat api to generate query strings a semantic way. It's designed to follow functional principles.
The query package has no dependencies and can be used as standalone utility.
yarn add @apitizer/query
or
npm install @apitizer/query
You can see the technical api documentation here
import { query } from '@apitizer/query';
// creating a query
const empty = query();
const withInitialParams = query({ token: '123abc' });
// set params using param
const withStatus = query().param('status', 'active');
const withStatusAndName = withStatus.param('name', 'foo');
// set params using params
const withOrderAndDirection = query().params({
by: 'status',
direction: 'asc'
});
// unset a parameter
const withStatusWithoutName = withStatusAndName.param('name', undefined);
// clear params (delete all set params)
const cleared = withStatusAndName.clear();
// check if query is empty
console.log(cleared.empty()); // true
console.log(withStatusAndName.empty()); // false
// get the actual query string
console.log(empty.get()); // ""
console.log(withInitialParams.get()); // "token=123abc"
console.log(withStatus.get()); // "status=active"
console.log(withStatusAndName.get()); // "status=active&name=foo"
console.log(withOrderAndDirection.get()); // "by=status&order=asc"
console.log(withStatusWithoutName.get()); // "status=active"
console.log(cleared.get()); // ""
FAQs
The Query Builder for the delightful rest api utility
The npm package @apitizer/query receives a total of 6 weekly downloads. As such, @apitizer/query popularity was classified as not popular.
We found that @apitizer/query 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.