Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@yorkjs/url
Advanced tools
整合 url 常用的工具方法。
CDN
<script src="https://unpkg.com/@yorkjs/url"></script>
<script>
Url.parseUrl(location.href)
</script>
NPM
npm install @yorkjs/url
import Url from '@yorkjs/url'
Url.parseUrl(location.href)
YARN
yarn add @yorkjs/url
import Url from '@yorkjs/url'
Url.parseUrl(location.href)
把 url 字符串解析成对象,对象格式如下:
{
protocol: string
hostname: string
port: string
pathname: string
search: string
hash: string
}
把 url 对象(格式如上)序列化成字符串。
把 hash 字符串(不能有开头的 #
)解析成对象,对象格式如下:
{
pathname: string
search: string
}
此方法常用于单页应用的 hash mode。
把 hash 对象(格式如上)序列化成字符串,不包含开头的 #
。
此方法常用于单页应用的 hash mode。
把 query 字符串(不能有开头的 ?
)解析成对象。
把 query 对象序列化成字符串,不包含开头的 ?
。
全平台适用,但需要确认以下函数是否存在:
String.prototype.trim
Array.isArray
如不存在,请自行打补丁。
FAQs
parse and stringify url
We found that @yorkjs/url 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.