Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

onlystate

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onlystate - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

4

dist/only-state.js
/*
* only-state.js 0.0.11
* only-state.js 0.0.12
* author:webszy
* date:2022/5/12 上午10:08:16
* date:2022/5/13 上午11:43:13
*/

@@ -6,0 +6,0 @@ import { reactive, computed, toRefs } from 'vue';

{
"name": "onlystate",
"version": "0.0.11",
"version": "0.0.12",
"description": "A state and only state management library for Vue3",

@@ -5,0 +5,0 @@ "main": "dist/only-state.js",

@@ -53,3 +53,3 @@

const hasKey = (keyName:string) => keyName in _State.state
const getOne = (keyName:string) => hasKey(keyName) ? toRefs(_State .state)[keyName] : undefined
const getOne = (keyName:string) => hasKey(keyName) ? toRefs(_State.state)[keyName] : <any>undefined
if(len === 0){

@@ -78,3 +78,3 @@ return _State.state

const hasKey = (keyName:string) => keyName in _State.getters
const getOne = (keyName:string) => hasKey(keyName) ? _State.getters[keyName] : undefined
const getOne = (keyName:string) => hasKey(keyName) ? _State.getters[keyName] : <any>undefined
if(len === 0){

@@ -81,0 +81,0 @@ return _State.getters

@@ -6,14 +6,4 @@ export declare const defineState: (state: {

};
export declare const useState: (key: string | string[], ...rest: any[]) => {
[key: string]: any;
} | undefined;
export declare const useGetters: (key: string | string[], ...rest: any[]) => false | {
value?: any;
} | {
[key: string]: {
value?: any;
};
} | ({
value?: any;
} | undefined)[] | undefined;
export declare const useState: (key: string | string[], ...rest: any[]) => any;
export declare const useGetters: (key: string | string[], ...rest: any[]) => any;
export declare const stateToRefs: () => {

@@ -32,14 +22,4 @@ [x: string]: {

};
useState: (key: string | string[], ...rest: any[]) => {
[key: string]: any;
} | undefined;
useGetters: (key: string | string[], ...rest: any[]) => false | {
value?: any;
} | {
[key: string]: {
value?: any;
};
} | ({
value?: any;
} | undefined)[] | undefined;
useState: (key: string | string[], ...rest: any[]) => any;
useGetters: (key: string | string[], ...rest: any[]) => any;
stateToRefs: () => {

@@ -46,0 +26,0 @@ [x: string]: {

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