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

@nanostores/query

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanostores/query - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

5

dist/main.d.ts
import { MapStore, ReadableAtom } from "nanostores";
declare type NoKey = null | undefined | void;
export declare type KeyInput = string | Array<string | ReadableAtom<string | NoKey>>;
declare type SomeKey = string | number;
export declare type KeyInput = SomeKey | Array<SomeKey | ReadableAtom<SomeKey | NoKey>>;
declare type Key = string;
declare type KeyParts = string[];
declare type KeyParts = SomeKey[];
declare type KeySelector = Key | Key[] | ((key: Key) => boolean);

@@ -7,0 +8,0 @@ export declare type Fetcher<T> = (...args: KeyParts) => Promise<T>;

9

dist/nanoquery.js

@@ -253,5 +253,8 @@ import { map, onStart, onStop, atom } from "nanostores";

};
function isSomeKey(key) {
return typeof key === "string" || typeof key === "number";
}
const getKeyStore = (keys) => {
if (typeof keys === "string")
return [atom([keys, [keys]]), () => {
if (isSomeKey(keys))
return [atom(["" + keys, [keys]]), () => {
}];

@@ -269,3 +272,3 @@ let keyStore = atom(null), keyParts = [];

const key = keys[i];
if (typeof key === "string") {
if (isSomeKey(key)) {
keyParts.push(key);

@@ -272,0 +275,0 @@ continue;

{
"name": "@nanostores/query",
"version": "0.2.0",
"version": "0.2.1",
"description": "Tiny remote data fetching library for Nano Stores",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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