
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
js-base-methods
Advanced tools
#js-base-methods
This is a npm package that contains a number of commonly used JavaScript methods.
1.Installation
2.import
1.The getCookie method is used to get the value of the specified key in the cookie.
@param name {string} // the key in cookie
@return {string} // the value in cookie
2.The getUrlParam method is used to get the value of the specified parameter in the URL.
@param name {string} // the parameter key in the URL
@return {string} // the parameter value in the URL
3.The objIsEmpty method is used to determine if a js object is an empty object.
@param obj {object} // the js object to be judged
@return {boolean} // True is empty, false is not empty.
4.The formatTime method is used to format time.
@param time {string|number} // timestamp in seconds
@param resType {string|number} // The format of the returned string, which defaults to 1.
// resType=1, the format is 2018-04-28
// resType=2, the format is 2018-04-28 18:00:00
// resType=3, the format is 18:00:00
@param connector {string} // Year, month, day connector, default is '-'.
@return {string} // formatted time
5.The countDown method for countdown
@param callback {function} // Callback function, which will be passed three string type parameters, respectively countdown hours, minutes, seconds.
@param endTime {string} // countdown end time, such as: 2018/4/28 18:00:00
@param startTime {string} // countdown start time, such as: 2018/5/1, the default is now.
6.The getMobileOperatingSystem method is used to get the current operating system type.
@return {string} // operating system type, such as 'Windows Phone','Android','iOS' or 'unknow'
FAQs
This is a package that contains many front-end common js methods.
We found that js-base-methods 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.