
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@pderas/vue2-utilities
Advanced tools
Vue utilities is built as a vue plugin to allow for general purpose functions to be used throughout the application
A vue.js utilities plugin
npm install --save @pderas/vue2-utilities
Vue utilities is built as a vue plugin to allow for general purpose functions to be used throughout the application
import Utilities from "@pderas/vue2-utilities";
// or just Vue.use(Utilities);
Vue.use(Utilities, {
extendDate: true,
extendNumber: true,
extendString: true
});
General usage: this.$utils.[FUNCTION_NAME]
// RedirectTo Example
this.$utils.redirectTo('/login')
name | Parameter | Type | Description | Return |
---|---|---|---|---|
createDate | timestamp | String | Creates a date object from a database timestamp and returns a date object in UTC | Date |
getParent | el identifier | HTMLElement String | Finds the closest parent element with the given identifier | HTMLElement |
getUrlParams | url | String | Converts the url parameters into an object | Object |
printView | html, timeout | String, Number | Create a print screen for the view given, default timeout is 500ms | N/A |
nl2br | str is_xhtml | String Boolean | Converts all newline characters in a string into 'br' tag | String |
redirectTo | url | String | Redirects the window to a new url (based off hostname url) | N/A |
safeActiveElement | doc | HTMLElement | Gets the active element safely from the doc | HTMLElement |
shadeColor | color percent | String Number | Takes a color and a percent and shades that color | String |
Required parameters are bolded
Name | Parameter | Type | Default | Description | Return |
---|---|---|---|---|---|
addTimezoneOffset | Modifies the date object by adding the timezone offset. | N/A | |||
format | format | String | 'M d Y' | Converts the date to a custom formatted string (month day, year @ time) | String |
getMinutesString | Gets the minute string for a date. | String | |||
getHoursString | Gets the hour string for a date. | String | |||
removeTimezoneOffset | Modifies the date object by removing the timezone offset. | N/A | |||
subMinutes | date | Date | Substracts the minutes of one date from another | Number | |
Depreciated. Please use the format prototype. |
Required parameters are bolded
Name | Parameter | Type | Default | Description | Return |
---|---|---|---|---|---|
precisionRound | precision | Number | 0 | Rounds a number to the specified precision | Number |
toCommaString | Converts a number to a comma seperated string | String | |||
toDollarString | showDollarSign | Boolean | true | Converts a number to a dollar string | String |
Required parameters are bolded
Name | Parameter | Type | Description | Return |
---|---|---|---|---|
capitalize | Capitalizes the first character | String | ||
capitalizeAll | delim | String | Capitalizes all characters (delim defaults to space) | String |
spacesToChar | char | String | Converts spaces to specified character | String |
stripSlashes | Removes slashes | String | ||
stripPeriods | Removes periods | String | ||
stripDashes | Removes dashes | String | ||
toAlphaNumeric | Coverts a string to alpha numeric | String |
Required parameters are bolded
This project is covered under the MIT License. Feel free to use it wherever you like.
FAQs
Vue utilities is built as a vue plugin to allow for general purpose functions to be used throughout the application
The npm package @pderas/vue2-utilities receives a total of 24 weekly downloads. As such, @pderas/vue2-utilities popularity was classified as not popular.
We found that @pderas/vue2-utilities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.