
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.
wf_core_nodejs
Advanced tools
core library of reusable code for use in various projects
npm install @weaverfundraising/wf_core_nodejs
Send GET Request
const {getRequest} = require('@weaverfundraising/wf_core_nodejs/https');
const options = {
hostname: 'somedomain.com',
path: '/api/route/id/1'
};
const headers = {
"X-App": "my-x-app-token"
}
const result = await getRequest(options.hostname, options.path, headers).catch(err => {});
if (result && typeof result === 'string') {
try {
result = JSON.parse(result);
} catch (err) {}
}
Send POST Request
const {postRequest} = require('@weaverfundraising/wf_core_nodejs/https');
const options = {
hostname: 'somedomain.com',
path: '/api/route/id/1'
};
const payload = {
apiKey: 'my-api-key',
id: 1,
name: 'some variable'
};
const headers = {
"X-App": "my-x-app-token"
}
const result = await postRequest(options.hostname, options.path, payload, headers).catch(err => {});
if (result && typeof result === 'string') {
try {
result = JSON.parse(result);
} catch (err) {}
}
isNull | notNull
const {isNull, notNull} = require('@weaverfundraising/wf_core_nodejs/util');
let myVar = null;
if (isNull(myVar)) { ... }
if (notNull(myVar)) { ... }
isEmpty | notEmpty
const {isEmpty} = require('@weaverfundraising/wf_core_nodejs/util');
const str = 'not empty';
const empty = ' ';
const arr = [1,2,3];
const nil = null;
if (isEmpty(str)) { ... }
if (isEmpty(empty)) { ... }
if (isEmpty(arr)) { ... }
if (isEmpty(nil)) { ... }
if (notEmpty(str)) { ... }
if (notEmpty(empty)) { ... }
if (notEmpty(arr)) { ... }
if (notEmpty(nil)) { ... }
isAFunction
const {isAFunction} = require('@weaverfundraising/wf_core_nodejs/util');
const fn = () => {};
const notAFn = "hello, world!";
if (isAFunction(fn)) { ... }
if (isAFunction(notAFn)) { ... }
toString
const {toString} = require('@weaverfundraising/wf_core_nodejs/util');
const obj = {Desc: "Object to convert to String"};
const str = "String will not change";
const num = 10.45;
const objStr = toString(obj);
const strStr = toString(str);
const numStr = toString(num);
toNumber
const {toNumber} = require('@weaverfundraising/wf_core_nodejs/util');
const num_1 = toNumber("123.45");
const num_2 = toNumber("NaN");
const num_3 = toNumber(35);
toBoolean
const {toBoolean} = require('@weaverfundraising/wf_core_nodejs/util');
const bool_1 = toBoolean(1);
const bool_2 = toBoolean("true");
deepClone
const {deepClone} = require('@weaverfundraising/wf_core_nodejs/util');
const obj1 = {
value: {
sub1: {
deep: "clone"
},
sub2: "Weird"
},
desc: "something blah blah",
data: [
{some: "data"},
"other data",
123
]
};
const clone = deepClone(obj1);
randomNumber
const {randomNumber} = require('@weaverfundraising/wf_core_nodejs/util');
const num_1 = randomNumber();
const num_2 = randomNumber(50);
const num_3 = randomNumber(100, 1000);
randomString
const {randomString} = require('@weaverfundraising/wf_core_nodejs/util');
const str_1 = randomString();
const str_2 = randomString(50);
const str_3 = randomString(-1);
Validate Phone Number Format
const {isValidPhone} = require('@weaverfundraising/wf_core_nodejs/validation');
const isValid = isValidPhone('123-456-7890');
Validate Email Format
const {isValidEmail} = require('@weaverfundraising/wf_core_nodejs/validation');
const isValid = isValidEmail('my.name@myemail.com');
const {WFMoney} = require('@weaverfundraising/wf_core_nodejs/money');
const money_1 = new WFMoney(10.50);
money_1.add(5);
money_1.subtract(1);
const currency = money_1.amount('c');
const pennies = money_1.amount('p');
const value = money_1.value;
FAQs
core library of reusable code
The npm package wf_core_nodejs receives a total of 2 weekly downloads. As such, wf_core_nodejs popularity was classified as not popular.
We found that wf_core_nodejs 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
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.