Socket
Socket
Sign inDemoInstall

@vue/shared

Package Overview
Dependencies
0
Maintainers
2
Versions
198
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
6M
increased by3.1%
Maintainers
2
Install size
78.6 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.22 (2024-04-15)

Bug Fixes

  • compat: fix $options mutation + adjust private API initialization (d58d133), closes #10626 #10636
  • compile-sfc: analyze v-bind shorthand usage in template (#10518) (e5919d4), closes #10515
  • compiler-core: fix loc.source for end tags with whitespace before > (16174da), closes #10694 #10695
  • compiler-core: fix v-bind shorthand for component :is (04af950), closes #10469 #10471
  • compiler-sfc: :is() and :where() in compound selectors (#10522) (660cadc), closes #10511
  • compiler-sfc: also search for .tsx when type import's extension is omitted (#10637) (34106bc), closes #10635
  • compiler-sfc: fix defineModel coercion for boolean + string union types (#9603) (0cef65c), closes #9587 #10676
  • compiler-sfc: fix universal selector scope (#10551) (54a6afa), closes #10548
  • compiler-sfc: use options module name if options provide runtimeModuleName options (#10457) (e76d743), closes #10454
  • custom-element: avoid setting attr to null if it is removed (#9012) (b49306a), closes #9006 #10324
  • hydration: properly handle optimized mode during hydrate node (#10638) (2ec06fd), closes #10607
  • reactivity: computed should not be detected as true by isProxy (#10401) (9da34d7)
  • reactivity: fix hasOwnProperty key coercion edge cases (969c5fb)
  • reactivity: fix tracking when hasOwnProperty is called with non-string value (c3c5dc9), closes #10455 #10464
  • runtime-core: fix errorHandler causes an infinite loop during execution (#9575) (ab59bed)
  • runtime-core: handle invalid values in callWithAsyncErrorHandling (53d15d3)
  • runtime-core: show hydration mismatch details for non-rectified mismatches too when PROD_HYDRATION_MISMATCH_DETAILS is set (#10599) (0dea7f9)
  • runtime-dom: v-model string/number coercion for multiselect options (#10576) (db374e5)
  • runtime-dom: fix css v-bind for suspensed components (#8523) (67722ba), closes #8520
  • runtime-dom: force update v-model number with leading 0 (#10506) (15ffe8f), closes #10503 #10615
  • runtime-dom: sanitize wrongly passed string value as event handler (#8953) (7ccd453), closes #8818
  • ssr: don't render v-if comments in TransitionGroup (#6732) (5a96267), closes #6715
  • Transition: ensure the KeepAlive children unmount w/ out-in mode (#10632) (fc99e4d), closes #10620
  • TransitionGroup: avoid set transition hooks for comment nodes and text nodes (#9421) (140a768), closes #4621 #4622 #5153 #5168 #7898 #9067
  • types: avoid merging object union types when using withDefaults (#10596) (37ba93c), closes #10594

Performance Improvements

  • add __NO_SIDE_EFFECTS__ comments (#9053) (d46df6b)
  • optimize component props/slots internal object checks (6af733d)
  • ssr: avoid calling markRaw on component instance proxy (4bc9f39)
  • ssr: optimize setup context creation for ssr in v8 (ca84316)

Readme

Source

@vue/shared

Internal utility functions and constants shared across @vue packages.

Keywords

FAQs

Last updated on 15 Apr 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