New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@globalbrain/sefirot

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@globalbrain/sefirot - npm Package Compare versions

Comparing version 0.32.1 to 0.33.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# [0.33.0](https://github.com/globalbrain/sefirot/compare/v0.32.1...v0.33.0) (2021-01-27)
### Features
* **form:** add callback data creation support in useData composable ([0622618](https://github.com/globalbrain/sefirot/commit/0622618af60646041a1cafb027ac68370c3c3b61))
## [0.32.1](https://github.com/globalbrain/sefirot/compare/v0.32.0...v0.32.1) (2021-01-26)

@@ -2,0 +8,0 @@

19

lib/composables/FormData.ts

@@ -5,2 +5,3 @@ import { reactive } from '@vue/composition-api'

data: T
init: InitFunction
update: UpdateFunction

@@ -10,7 +11,12 @@ }

export type State = Record<string, any>
export type InitFunction = () => void
export type UpdateFunction = (model: string, value: any) => void
export function useFormData<T extends State>(data: T): Data<T> {
const state = reactive(data)
export function useFormData<T extends State>(data: T | (() => T)): Data<T> {
const state = reactive(getData(data))
function init(): void {
initData(state, getData(data) as any)
}
function update(model: string, value: any): void {

@@ -22,2 +28,3 @@ updateData(state, model, value)

data: state as T,
init,
update

@@ -27,4 +34,12 @@ }

function getData<T extends State>(data: T | (() => T)): T {
return data instanceof Function ? data() : data
}
function initData<T extends State>(data: T, source: T): void {
Object.assign(data, source)
}
function updateData<T extends State>(data: T, model: string, value: any): void {
(data as any)[model] = value
}

2

package.json
{
"name": "@globalbrain/sefirot",
"version": "0.32.1",
"version": "0.33.0",
"description": "Vue Components for Global Brain Design System.",

@@ -5,0 +5,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc