Socket
Book a DemoInstallSign in
Socket

knue

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knue

Drop-in replacement for much of the Knockout API, but backed with Vue.

latest
Source
npmnpm
Version
1.0.0-alpha.3
Version published
Weekly downloads
2
-86.67%
Maintainers
1
Weekly downloads
 
Created
Source

Knue - Knockout, powered by Vue

(WARNING: Not production ready, still in alpha. Open issues if you have a particular Knockout API you need.)

Drop-in replacement for much of the Knockout API, but backed with Vue. Useful for migrating from a Knockout codebase when refactoring to Vue.

ko

Root object

import Knue from 'knue'

const ko = new Knue()

API

✅ Observables (v1.0.0-alpha.1)

Observable

const ko = new Knue()

const foo = ko.observable(1)

Or, methods can be destructured, like:

const { observable } = new Knue()

const foo = observable(1)

ObservableArray

const foo = ko.observableArray<string>()
console.log(foo()) // []

Computed

const co1 = ko.computed(() => 1)
const co2 = computed(() => co1() + 1)
console.log(co1()) // 1
console.log(co2()) // 2

FAQs

Package last updated on 14 Jan 2024

Did you know?

Socket

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