Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
browser-utily-tools
Advanced tools
Utility tools in the browser environment
npm install browser-utily-tools --save
DEMO-01 适配一个集合对数据
import { adapterDataListFormatSync } from "browser-utily-tools";
const source = [
{ number: 10, value: "黎明" },
{ number: 23, value: "liling" },
];
const rules = { number: "age", value: "name" };
const result = adapterDataListFormatSync(source, rules);
// [{ age: 10, name: "黎明" }, { age: 23, name: "liling" }];
DEMO-02 适配一组数据
import { adapterDataFormatSync } from "browser-utily-tools";
const obj = { a: "a", b: "b" };
const rules = { a: "c" };
adapterDataFormatSync(obj);
// { c: "a" , b: "b" }
DEMO-03 List 转为 Tree
import { listToTree } from "browser-utily-tools";
const entries = [
{
id: "12",
parentId: "0",
text: "Man",
level: "1",
children: null,
},
{
id: "6",
parentId: "12",
text: "Boy",
level: "2",
children: null,
},
{
id: "7",
parentId: "12",
text: "Other",
level: "2",
children: null,
},
{
id: "9",
parentId: "0",
text: "Woman",
level: "1",
children: null,
},
{
id: "11",
parentId: "9",
text: "Girl",
level: "2",
children: null,
},
];
listToTree(entries);
DEMO-04 一些基本类型方法
import { types } from "browser-utily-tools";
types.isArray([]); // true
types.isNAN(NAN); // true
types.isEqual({ a: 10 }, { a: 10 }); // false
types.isNull(null); // true
types.isRegExp(/\[|]/g); // true
// ...
types.hasType(null); // Null
types.hasType({}); // Object
// ....
FAQs
Utility tools in the browser environment
We found that browser-utily-tools 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.