Socket
Socket
Sign inDemoInstall

@vue/shared

Package Overview
Dependencies
0
Maintainers
0
Versions
202
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vue/shared

internal utils shared across @vue packages


Version published
Weekly downloads
6.3M
increased by0.78%
Maintainers
0
Install size
79.1 kB
Created
Weekly downloads
 

Package description

What is @vue/shared?

The @vue/shared package is a collection of utility functions used by Vue.js itself and can be leveraged in Vue.js projects or any other project where these utilities might be useful. It includes functions for object manipulation, type checking, and more, aiming to provide a lightweight and efficient set of tools for common programming tasks.

What are @vue/shared's main functionalities?

Type Checking

Provides functions to check the type of a variable, such as whether it is an object, string, function, etc. This is useful for ensuring that variables match expected types before performing operations on them.

import { isObject } from '@vue/shared';
console.log(isObject({})); // true
console.log(isObject(null)); // false

Object Manipulation

Includes functions to manipulate objects, such as extending one object with properties from another. This is useful for merging objects or copying properties.

import { extend } from '@vue/shared';
const obj1 = { a: 1 };
const obj2 = { b: 2 };
extend(obj1, obj2);
console.log(obj1); // { a: 1, b: 2 }

String Capitalization

Provides simple string manipulation functions like capitalizing the first letter of a string. Useful for formatting text.

import { capitalize } from '@vue/shared';
console.log(capitalize('hello')); // 'Hello'

Other packages similar to @vue/shared

Changelog

Source

3.4.30 (2024-06-22)

Note: this release contains a fix (#11150) that requires vue-tsc to also be updated in sync to ^2.0.22. See #11196

Bug Fixes

  • compiler-core: should not remove slot node with v-else (#11150) (e102670)
  • hydration: fix css vars hydration mismatch false positive on attr-fallthrough (#11190) (7ad67ce), closes #11188
  • hydration: skip prop mismatch check for directives that mutate DOM in created (3169c91), closes #11189
  • reactivity: fix side effect computed dirty level (#11183) (3bd79e3), closes #11181 #11169
  • runtime-core: ensure unmount dynamic components in optimized mode (#11171) (220fe24), closes #11168
  • runtime-core: update devtool __vnode on patch, avoid memory leak during dev (a959781), closes #11192
  • runtime-dom: ensure only symbols are explicitly stringified during attribute patching (#11182) (a2e35d6), closes #11177
  • runtime-dom: prevent setting state as attribute for custom elements (#11165) (8ae4c29), closes #11163

Performance Improvements

Readme

Source

@vue/shared

Internal utility functions and constants shared across @vue packages.

Keywords

FAQs

Last updated on 22 Jun 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc