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

@hyeon/react-use

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyeon/react-use - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

9

dist/index.esm.js

@@ -15,3 +15,3 @@ import { pipe } from 'fp-ts/lib/function';

const transformedKey = transformFn(key);
const transformedValue = typeof value === 'object' ? transformObjectKeys(value, transformFn) : value;
const transformedValue = typeof value === 'object' && value !== null && !Array.isArray(value) ? transformObjectKeys(value, transformFn) : value;
return {

@@ -21,7 +21,6 @@ ...acc,

};
})); // TODO: 받아온 타입을 그대로 반환하도록 하는 더 좋은 방법 타입을 추론할 수 있도록
}));
}
const useRemoveSpaceProgramming = initialState => {
const [value, setValue] = useState(transformObjectKeys(initialState));
const useRemoveSpaceProgramming = (initialState, fn) => {
const [value, setValue] = useState(transformObjectKeys(initialState, fn));
const setRemoveSpaceProgramming = useCallback(tree => setValue(tree), [setValue]);

@@ -28,0 +27,0 @@ return [value, setRemoveSpaceProgramming];

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

type RecordObject = Record<string, unknown>;
type RecordObject = Record<string, any>;
declare function transformObjectKeys<T extends RecordObject>(obj: T, transformFn?: (key?: string) => string): RecordObject;
export declare const useRemoveSpaceProgramming: <T extends RecordObject>(initialState: T) => [T, (v: T) => void];
export declare const useRSP: <T extends RecordObject>(initialState: T) => [T, (v: T) => void];
export declare const useRemoveSpaceProgramming: <T extends RecordObject>(initialState: T, fn?: ((key?: string) => string) | undefined) => [T, (v: T) => void];
export declare const useRSP: <T extends RecordObject>(initialState: T, fn?: ((key?: string) => string) | undefined) => [T, (v: T) => void];
export default useRemoveSpaceProgramming;
export declare const useObj2KeyMap: <T extends RecordObject>(initialState: T) => [T, (v: T) => void];
export declare const useObj2KeyMap: <T extends RecordObject>(initialState: T, fn?: ((key?: string) => string) | undefined) => [T, (v: T) => void];
export declare const obj2keyMap: typeof transformObjectKeys;
{
"name": "@hyeon/react-use",
"version": "0.0.8",
"version": "0.0.9",
"type": "module",

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

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