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
4.8M
decreased by-17.48%
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.24 (2024-04-22)

Bug Fixes

  • compiler-core: handle template ref bound via v-bind object on v-for (#10706) (da7adef), closes #10696
  • compiler-core: properly parse await expressions in edge cases (b92c25f), closes #10754
  • compiler-sfc: handle readonly operator and ReadonlyArray/Map/Set types (5cef52a), closes #10726
  • compiler-ssr: fix hydration mismatch for conditional slot in transition (f12c81e), closes #10743
  • compiler-ssr: fix v-html SSR for nullish values (1ff4076), closes #10725
  • deps: update compiler (#10760) (15df5c1)
  • runtime-core: fix edge case of KeepAlive inside Transition with slot children (#10719) (e51ca61), closes #10708
  • runtime-core: further fix slots _ctx check (cde7f05), closes #10724
  • runtime-core: props should be readonly via direct template access (b93f264), closes #8216 #10736
  • transition: transition is breaking/flickering when enter is canceled (#10688) (65109a7)

Readme

Source

@vue/shared

Internal utility functions and constants shared across @vue packages.

Keywords

FAQs

Last updated on 22 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