npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue2000

v2.8.2

Published

Reactive, component-oriented view layer for modern web interfaces.

Downloads

4

Readme

🥑 Vue2000

Vue 2 has reached End of Life, However, legacy projects using Vue2 will continue to exist. In many cases, the cost of upgrading projects to Vue3 is not proportional to the benefits.

So this is a fork of Vue v2.7.16, and we will try to continue some necessary maintenance and improvements.

Usage

add overrides to your package.json file, and run npm install package.json

npm

+    "overrides": {
+        "vue": "npm:vue2000@^2.7.16"
+    }

pnpm

+ "pnpm": {
+        "overrides": {
+            "vue@^2.7.14": "npm:vue2000@^2"
+        }
+    }

Changelog

Allow component names to use SVG tag reserved words by differing in case

In Vue2, if the component name is an SVG tag (such as image, font, animate, desc...), it will be created using SVG namespace, which is not visible on the Page.

Vue2 is case-insensitive when determining whether a component name is an SVG tag. This prevents you from using component names like Image, Desc, and Animate. In fact, this is not a necessary strategy, because SVG is case-sensitive, and Vue3 is also case-sensitive when determining whether the component name is an SVG tag.

Related:

Fine-grained manual control over the Vue reactive system

import { setUnobservable } from 'vue'

let MyData = {
    name     : "Name",
    playload : setUnobservable(HugeObject1)
    images   : setUnobservable(HugeObject2, { keys:["rawList", "__test__"] })
    info     : setUnobservable(HugeObject3, { whitelist:["ctime", "state"] })
}
export default {
    data(){
        reutrn { MyData }
    }
}

The Vue 2.x reactive system converts all data placed in the component's data to observable objects. If the object is complex, such as those from an external system, there can be significant performance overhead.

In vue2000, a method is provided to mark objects as non-observable. Moreover, you can individually specify whether some keys of the object are observable or unobservable.

import { setUnobservable, isUnobservable, clearUnobservable } from "vue"
  • setUnobservable<T>(value: T, options?: { whitelist: string[] } | { keys: string[]}): T : Mark the object as Unobservable, individual key values can be specified through options.
  • isUnobservable(value: any): boolean : Determine whether the object is marked as non-observable.
  • clearUnobservable<T>(value: T): T : Remove the non-observable mark from the object.

You can also set __vueUnobservable directly on the object


// All keys be Unobservable
let MyData = {
  ...HugeData,
  __vueUnobservable: true
}

// Specified keys be Unobservable, other keys can be observed
let MyData = {
  raw: HugeData,
  __vueUnobservable: ["raw"]
}


// Specified keys can be observed, other keys cannot be observed
let MyData = {
 ...HugeData,
  name: "XXX"
  updateTime: 100,
  __vueUnobservable: Object.assign(['updateTime','name'], {isWhitelist:true})
}

Related: