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

@orpc/shared

Package Overview
Dependencies
Maintainers
0
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orpc/shared - npm Package Compare versions

Comparing version 0.0.0-next.b2e67f7 to 0.0.0-next.b36125c

dist/src/iterator.d.ts

40

dist/index.js

@@ -51,2 +51,5 @@ // src/object.ts

}
function isTypescriptObject(value2) {
return !!value2 && (typeof value2 === "object" || typeof value2 === "function");
}

@@ -72,2 +75,15 @@ // src/error.ts

// src/function.ts
function once(fn) {
let cached;
return () => {
if (cached) {
return cached.result;
}
const result = fn();
cached = { result };
return result;
};
}
// src/interceptor.ts

@@ -127,2 +143,21 @@ function onStart(callback) {

// src/iterator.ts
function isAsyncIteratorObject(maybe) {
if (!maybe || typeof maybe !== "object") {
return false;
}
return Symbol.asyncIterator in maybe && typeof maybe[Symbol.asyncIterator] === "function";
}
// src/json.ts
function parseEmptyableJSON(text) {
if (!text) {
return void 0;
}
return JSON.parse(text);
}
function stringifyJSON(value2) {
return JSON.stringify(value2);
}
// src/value.ts

@@ -144,3 +179,5 @@ function value(value2, ...args) {

intercept,
isAsyncIteratorObject,
isObject,
isTypescriptObject,
mapEntries,

@@ -153,4 +190,7 @@ mapValues,

onSuccess,
once,
parseEmptyableJSON,
retry,
set,
stringifyJSON,
toError,

@@ -157,0 +197,0 @@ trim,

1

dist/src/function.d.ts
export type AnyFunction = (...args: any[]) => any;
export declare function once<T extends () => any>(fn: T): () => ReturnType<T>;
//# sourceMappingURL=function.d.ts.map

@@ -5,2 +5,4 @@ export * from './chain';

export * from './interceptor';
export * from './iterator';
export * from './json';
export * from './object';

@@ -7,0 +9,0 @@ export * from './types';

@@ -12,2 +12,6 @@ export type Segment = string | number;

export declare function isObject(value: unknown): value is Record<PropertyKey, unknown>;
/**
* Check if the value satisfy a `object` type in typescript
*/
export declare function isTypescriptObject(value: unknown): value is object & Record<PropertyKey, unknown>;
//# sourceMappingURL=object.d.ts.map

2

package.json
{
"name": "@orpc/shared",
"type": "module",
"version": "0.0.0-next.b2e67f7",
"version": "0.0.0-next.b36125c",
"license": "MIT",

@@ -6,0 +6,0 @@ "homepage": "https://orpc.unnoq.com",

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