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

rest-hooks

Package Overview
Dependencies
Maintainers
1
Versions
328
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-hooks - npm Package Compare versions

Comparing version 0.0.10 to 0.1.0

6

lib/connect/hooks.js

@@ -12,3 +12,3 @@ import { useContext, useMemo, useEffect } from 'react';

function UserProfile({ location: { id }})
const user = selectResource(UserResource, selectSingle, { id });
const user = selectResource(UserResource, selectors.Single, { id });
return <div>{user.name}</div>

@@ -46,3 +46,3 @@ }

UserResource,
selectSingle,
selectors.Single,
{ id },

@@ -69,2 +69,2 @@ );

*/
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb25uZWN0L2hvb2tzLnRzIl0sIm5hbWVzIjpbInVzZUNvbnRleHQiLCJ1c2VNZW1vIiwidXNlRWZmZWN0IiwiU3RhdGVDb250ZXh0IiwiRGlzcGF0Y2hDb250ZXh0Iiwic2VsZWN0UmVzb3VyY2UiLCJNb2RlbCIsInNlbGVjdG9yIiwicGFyYW1zIiwic3RhdGUiLCJyZXNvdXJjZSIsImZldGNoUmVzb3VyY2UiLCJmZXRjaCIsInVybCIsInVzZVJlc291cmNlIl0sIm1hcHBpbmdzIjoiQUFBQSxTQUFTQSxVQUFULEVBQXFCQyxPQUFyQixFQUE4QkMsU0FBOUIsUUFBK0MsT0FBL0M7QUFHQSxTQUFTQyxZQUFULEVBQXVCQyxlQUF2QixRQUE4QyxXQUE5Qzs7QUFHQTs7Ozs7O0FBTUE7Ozs7OztBQU1BLE9BQU8sU0FBU0MsY0FBVCxDQUNMQyxLQURLLEVBRUxDLFFBRkssRUFHTEMsTUFISyxFQUlMO0FBQ0EsTUFBTUMsS0FBSyxHQUFHVCxVQUFVLENBQUNHLFlBQUQsQ0FBeEI7QUFDQSxNQUFNTyxRQUFRL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vdXJjZShcbiAgICBVc2VyUmVzb3VyY2UsXG4gICAgc2VsZWN0b3JzLlNpbmdsZSxcbiAgICB7IGlkIH0sXG4gICk7XG4gIHJldHVybiA8ZGl2Pnt1c2VyLm5hbWV9PC9kaXY+XG59XG4qL1xuZXhwb3J0IGZ1bmN0aW9uIHVzZVJlc291cmNlPFQgZXh0ZW5kcyB0eXBlb2YgTW9kZWxSZXNvdXJjZT4oXG4gIE1vZGVsOiBULFxuICBzZWxlY3RvcjogKE1vZGVsOiBULCBzdGF0ZToge30sIHBhcmFtczoge30pID0+IEFic3RyYWN0SW5zdGFuY2VUeXBlPFQ+LFxuICBwYXJhbXM6IHt9IHwgbnVsbCxcbikge1xuICBmZXRjaFJlc291cmNlKE1vZGVsLCBwYXJhbXMpO1xuICByZXR1cm4gc2VsZWN0UmVzb3VyY2UoTW9kZWwsIHNlbGVjdG9yLCBwYXJhbXMpO1xufVxuXG5pbnRlcmZhY2UgTXV0YXRlRGlzcGF0Y2hlcnMge1xuICBjcmVhdGU6IEZ1bmN0aW9uO1xuICB1cGRhdGU6IEZ1bmN0aW9uO1xufVxuLypcbmZ1bmN0aW9uIFVzZXJGb3JtKCkge1xuICBjb25zdCB7IGNyZWF0ZSB9ID0gdXNlTXV0YXRlKFVzZXJSZXNvdXJjZSk7XG4gIHJldHVybiA8Zm9ybSBvblN1Ym1pdD17KGRhdGEpID0+IGNyZWF0ZShkYXRhKX0+PC9mb3JtPlxufVxuKi9cbi8qZXhwb3J0IGZ1bmN0aW9uIHVzZU11dGF0ZShtb2RlbDogTW9kZWxSZXNvdXJjZSk6IE11dGF0ZURpc3BhdGNoZXJzIHtcblxufVxuKi9cbiJdfQ==

@@ -43,3 +43,3 @@ import "core-js/modules/es6.promise";

regeneratorRuntime.mark(function _callee(Model, params) {
var data;
var data, schema;
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -54,2 +54,8 @@ while (1) {

data = _context.sent;
schema = Model.getSchema();
if (Array.isArray(data)) {
schema = Model.getListSchema();
}
dispatch({

@@ -59,3 +65,3 @@ type: 'receive',

meta: {
schema: Model.schema,
schema: schema,
url: Model.url(params)

@@ -65,3 +71,3 @@ }

case 4:
case 6:
case "end":

@@ -85,2 +91,2 @@ return _context.stop();

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb25uZWN0L3Byb3ZpZGVyLnRzeCJdLCJuYW1lcyI6WyJSZWFjdCIsInVzZVJlZHVjZXIiLCJTdGF0ZUNvbnRleHQiLCJEaXNwYXRjaENvbnRleHQiLCJyZWR1Y2VyIiwiUmVzdFByb3ZpZGVyIiwiY2hpbGRyZW4iLCJlbnRpdGllcyIsInJlc3VsdHMiLCJzdGF0ZSIsImRpc3BhdGNoIiwiZGlzcGF0Y2hlcnMiLCJmZXRjaCIsIk1vZGVsIiwicGFyYW1zIiwiZGF0YSIsInR5cGUiLCJwYXlsb2FkIiwibWV0YSIsInNjaGVtYSIsInVybCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLE9BQU9BLEtBQVAsSUFBZ0JDLFVBQWhCLFFBQThDLE9BQTlDO0FBQ0EsU0FBU0MsWUFBVCxFQUF1QkMsZUFBdkIsUUFBOEMsV0FBOUM7QUFFQSxPQUFPQyxPQUFQLE1BQW9CLGtCQUFwQjtBQUVBLGVBQWUsU0FBU0MsWUFBVCxPQUE4RDtBQUFBLE1BQXRDQyxRQUFzQyxRQUF0Q0EsUUFBc0M7O0FBQzNFO0FBRDJFLG9CQUVqREwsVUFBVSxDQUFDRyxPQUFELEVBQVU7QUFBRUcsSUFBQUEsUUFBUSxFQUFFLEVBQVo7QUFBZ0JDLElBQUFBLE9BQU8sRUFBRTtBQUF6QixHQUFWLENBRnVDO0FBQUE7QUFBQSxNQUVwRUMsS0FGb0U7QUFBQSxNQUU3REMsUUFGNkQ7O0FBSTNFLE1BQU1DLFdBQVc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0YXRlfT5cbiAgICAgIDxEaXNwYXRjaENvbnRleHQuUHJvdmlkZXIgdmFsdWU9e2Rpc3BhdGNoZXJzfT5cbiAgICAgICAge2NoaWxkcmVufVxuICAgICAgPC9EaXNwYXRjaENvbnRleHQuUHJvdmlkZXI+XG4gICAgPC9TdGF0ZUNvbnRleHQuUHJvdmlkZXI+XG4gICk7XG59XG4iXX0=

@@ -1,4 +0,4 @@

import { ModelResource, withSchema } from './model';
import { ModelResource } from './model';
import { RestProvider, hooks } from './connect';
import * as selectors from './state/selectors';
export { ModelResource, withSchema, RestProvider, hooks, selectors };
export { ModelResource, RestProvider, hooks, selectors };

@@ -1,5 +0,5 @@

import { ModelResource, withSchema } from './model';
import { ModelResource } from './model';
import { RestProvider, hooks } from './connect';
import * as selectors from './state/selectors';
export { ModelResource, withSchema, RestProvider, hooks, selectors };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6WyJNb2RlbFJlc291cmNlIiwid2l0aFNjaGVtYSIsIlJlc3RQcm92aWRlciIsImhvb2tzIiwic2VsZWN0b3JzIl0sIm1hcHBpbmdzIjoiQUFBQSxTQUFTQSxhQUFULEVBQXdCQyxVQUF4QixRQUEwQyxTQUExQztBQUNBLFNBQVNDLFlBQVQsRUFBdUJDLEtBQXZCLFFBQW9DLFdBQXBDO0FBQ0EsT0FBTyxLQUFLQyxTQUFaLE1BQTJCLG1CQUEzQjtBQUVBLFNBQVNKLGFBQVQsRUFBd0JDLFVBQXhCLEVBQW9DQyxZQUFwQyxFQUFrREMsS0FBbEQsRUFBeURDLFNBQXpEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTW9kZWxSZXNvdXJjZSwgd2l0aFNjaGVtYSB9IGZyb20gJy4vbW9kZWwnO1xuaW1wb3J0IHsgUmVzdFByb3ZpZGVyLCBob29rcyB9IGZyb20gJy4vY29ubmVjdCc7XG5pbXBvcnQgKiBhcyBzZWxlY3RvcnMgZnJvbSAnLi9zdGF0ZS9zZWxlY3RvcnMnO1xuXG5leHBvcnQgeyBNb2RlbFJlc291cmNlLCB3aXRoU2NoZW1hLCBSZXN0UHJvdmlkZXIsIGhvb2tzLCBzZWxlY3RvcnMgfTtcbiJdfQ==
export { ModelResource, RestProvider, hooks, selectors };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6WyJNb2RlbFJlc291cmNlIiwiUmVzdFByb3ZpZGVyIiwiaG9va3MiLCJzZWxlY3RvcnMiXSwibWFwcGluZ3MiOiJBQUFBLFNBQVNBLGFBQVQsUUFBOEIsU0FBOUI7QUFDQSxTQUFTQyxZQUFULEVBQXVCQyxLQUF2QixRQUFvQyxXQUFwQztBQUNBLE9BQU8sS0FBS0MsU0FBWixNQUEyQixtQkFBM0I7QUFFQSxTQUFTSCxhQUFULEVBQXdCQyxZQUF4QixFQUFzQ0MsS0FBdEMsRUFBNkNDLFNBQTdDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTW9kZWxSZXNvdXJjZSB9IGZyb20gJy4vbW9kZWwnO1xuaW1wb3J0IHsgUmVzdFByb3ZpZGVyLCBob29rcyB9IGZyb20gJy4vY29ubmVjdCc7XG5pbXBvcnQgKiBhcyBzZWxlY3RvcnMgZnJvbSAnLi9zdGF0ZS9zZWxlY3RvcnMnO1xuXG5leHBvcnQgeyBNb2RlbFJlc291cmNlLCBSZXN0UHJvdmlkZXIsIGhvb2tzLCBzZWxlY3RvcnMgfTtcbiJdfQ==
import ModelResource from './ModelResource';
import withSchema from './registry';
export { ModelResource, withSchema };
export { ModelResource };
import ModelResource from './ModelResource';
import withSchema from './registry';
export { ModelResource, withSchema };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RlbC9pbmRleC50cyJdLCJuYW1lcyI6WyJNb2RlbFJlc291cmNlIiwid2l0aFNjaGVtYSJdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT0EsYUFBUCxNQUEwQixpQkFBMUI7QUFDQSxPQUFPQyxVQUFQLE1BQXVCLFlBQXZCO0FBRUEsU0FBU0QsYUFBVCxFQUF3QkMsVUFBeEIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTW9kZWxSZXNvdXJjZSBmcm9tICcuL01vZGVsUmVzb3VyY2UnO1xuaW1wb3J0IHdpdGhTY2hlbWEgZnJvbSAnLi9yZWdpc3RyeSc7XG5cbmV4cG9ydCB7IE1vZGVsUmVzb3VyY2UsIHdpdGhTY2hlbWEgfTtcbiJdfQ==
export { ModelResource };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RlbC9pbmRleC50cyJdLCJuYW1lcyI6WyJNb2RlbFJlc291cmNlIl0sIm1hcHBpbmdzIjoiQUFBQSxPQUFPQSxhQUFQLE1BQTBCLGlCQUExQjtBQUVBLFNBQVNBLGFBQVQiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTW9kZWxSZXNvdXJjZSBmcm9tICcuL01vZGVsUmVzb3VyY2UnO1xuXG5leHBvcnQgeyBNb2RlbFJlc291cmNlIH07XG4iXX0=
import request from 'superagent';
import { schema } from 'normalizr';
import { schema, Schema } from 'normalizr';
import { AbstractInstanceType } from '../types';

@@ -10,3 +10,2 @@ declare type Method = 'get' | 'post' | 'put' | 'patch' | 'delete';

abstract pk(): string | number | null;
static schema: schema.Entity;
static fromJS<T extends typeof ModelResource>(this: T, props: Partial<AbstractInstanceType<T>>): AbstractInstanceType<T>;

@@ -17,3 +16,5 @@ static pk<T extends typeof ModelResource>(this: T, params: Partial<AbstractInstanceType<T>>): string | number | null;

static fetch<T extends typeof ModelResource>(this: T, method?: Method, urlParams?: Partial<AbstractInstanceType<T>>, body?: Partial<AbstractInstanceType<T>>): Promise<any>;
static getSchema<T extends typeof ModelResource>(this: T): schema.Entity;
static getListSchema<T extends typeof ModelResource>(this: T): Schema;
}
export {};

@@ -5,2 +5,5 @@ import "core-js/modules/es6.promise";

import "core-js/modules/es6.object.assign";
import "core-js/modules/es6.regexp.to-string";
import "core-js/modules/es6.date.to-string";
import _memoize from "lodash/memoize";

@@ -20,3 +23,15 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

import request from 'superagent';
import { schema } from 'normalizr';
var _getSchema = _memoize(function (M) {
return new schema.Entity(M.urlRoot, {}, {
idAttribute: function idAttribute(value) {
return (M.pk(value) || '').toString();
},
processStrategy: function processStrategy(value) {
return M.fromJS(value);
}
});
});
var ModelResource =

@@ -100,2 +115,12 @@ /*#__PURE__*/

}()
}, {
key: "getSchema",
value: function getSchema() {
return _getSchema(this);
}
}, {
key: "getListSchema",
value: function getListSchema() {
return [this.getSchema()];
}
}]);

@@ -112,5 +137,3 @@

_defineProperty(ModelResource, "schema", void 0);
export { ModelResource as default };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RlbC9Nb2RlbFJlc291cmNlLnRzIl0sIm5hbWVzIjpbInJlcXVlc3QiLCJNb2RlbFJlc291cmNlIiwiUyIsImNvbnN0cnVjdG9yIiwidXJsIiwicHJvcHMiLCJFcnJvciIsImluc3RhbmNlIiwiT2JqZWN0IiwiYXNzaWduIiwicGFyYW1zIiwicHJvdG90eXBlIiwicGsiLCJjYWxsIiwidXJsUGFyYW1zIiwidXJsUm9vdCIsIm1ldGhvZCIsImJvZHkiLCJyZXEiLCJmZXRjaFBsdWdpbiIsInVzZSIsInNlbmQiLCJqc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5cGVvZiBNb2RlbFJlc291cmNlPihcbiAgICB0aGlzOiBULFxuICAgIHVybFBhcmFtcz86IFBhcnRpYWw8QWJzdHJhY3RJbnN0YW5jZVR5cGU8VD4+LFxuICApOiBzdHJpbmcge1xuICAgIGlmICh1cmxQYXJhbXMgJiYgdGhpcy5wayh1cmxQYXJhbXMpKSB7XG4gICAgICByZXR1cm4gYCR7dGhpcy51cmxSb290fSR7dGhpcy5wayh1cmxQYXJhbXMpfWA7XG4gICAgfVxuICAgIHJldHVybiB0aGlzLnVybFJvb3Q7XG4gIH1cblxuICBzdGF0aWMgYXN5bmMgZmV0Y2g8VCBleHRlbmRzIHR5cGVvZiBNb2RlbFJlc291cmNlPihcbiAgICB0aGlzOiBULFxuICAgIG1ldGhvZDogTWV0aG9kID0gJ2dldCcsXG4gICAgdXJsUGFyYW1zPzogUGFydGlhbDxBYnN0cmFjdEluc3RhbmNlVHlwZTxUPj4sXG4gICAgYm9keT86IFBhcnRpYWw8QWJzdHJhY3RJbnN0YW5jZVR5cGU8VD4+LFxuICApIHtcbiAgICBsZXQgcmVxID0gcmVxdWVzdFttZXRob2RdKHRoaXMudXJsKHVybFBhcmFtcykpO1xuICAgIGlmICh0aGlzLmZldGNoUGx1Z2luKSByZXEgPSByZXEudXNlKHRoaXMuZmV0Y2hQbHVnaW4pO1xuICAgIGlmIChib2R5KSByZXEgPSByZXEuc2VuZChib2R5KTtcbiAgICBjb25zdCBqc29uID0gKGF3YWl0IHJlcSkuYm9keTtcbiAgICByZXR1cm4ganNvbjtcbiAgfVxufVxuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2RlbC9Nb2RlbFJlc291cmNlLnRzIl0sIm5hbWVzIjpbInJlcXVlc3QiLCJzY2hlbWEiLCJnZXRTY2hlbWEiLCJNIiwiRW50aXR5IiwidXJsUm9vdCIsImlkQXR0cmlidXRlIiwidmFsdWUiLCJway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S51c2UodGhpcy5mZXRjaFBsdWdpbik7XG4gICAgaWYgKGJvZHkpIHJlcSA9IHJlcS5zZW5kKGJvZHkpO1xuICAgIGNvbnN0IGpzb24gPSAoYXdhaXQgcmVxKS5ib2R5O1xuICAgIHJldHVybiBqc29uO1xuICB9XG5cbiAgc3RhdGljIGdldFNjaGVtYTxUIGV4dGVuZHMgdHlwZW9mIE1vZGVsUmVzb3VyY2U+KHRoaXM6IFQpIHtcbiAgICByZXR1cm4gZ2V0U2NoZW1hKHRoaXMpO1xuICB9XG4gIHN0YXRpYyBnZXRMaXN0U2NoZW1hPFQgZXh0ZW5kcyB0eXBlb2YgTW9kZWxSZXNvdXJjZT4odGhpczogVCk6IFNjaGVtYSB7XG4gICAgcmV0dXJuIFt0aGlzLmdldFNjaGVtYSgpXVxuICB9XG59XG4iXX0=
import { AbstractInstanceType } from '../types';
import { ModelResource } from '../model';
import { State } from './types';
export declare function selectSingle<T extends typeof ModelResource>(Model: T, state: State<ModelResource>, urlParams: Partial<AbstractInstanceType<T>>): AbstractInstanceType<T> | null;
export declare function Single<T extends typeof ModelResource>(Model: T, state: State<ModelResource>, urlParams: Partial<AbstractInstanceType<T>>): AbstractInstanceType<T> | null;
import "core-js/modules/es6.array.is-array";
export function selectSingle(Model, state, urlParams) {
export function Single(Model, state, urlParams) {
var id = Model.pk(urlParams);

@@ -28,2 +28,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdGF0ZS9zZWxlY3RvcnMudHMiXSwibmFtZXMiOlsic2VsZWN0U2luZ2xlIiwiTW9kZWwiLCJzdGF0ZSIsInVybFBhcmFtcyIsImlkIiwicGsiLCJ1cmwiLCJyZXN1bHRzIiwiQXJyYXkiLCJpc0FycmF5IiwiRXJyb3IiLCJ1bmRlZmluZWQiLCJyZXNvdXJjZUVudGl0eVNlY3Rpb24iLCJlbnRpdGllcyIsInVybFJvb3QiLC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KSB7XG4gICAgY29uc3QgdXJsID0gTW9kZWwudXJsKHVybFBhcmFtcyk7XG4gICAgY29uc3QgcmVzdWx0cyA9IHN0YXRlLnJlc3VsdHNbdXJsXTtcbiAgICBpZiAoQXJyYXkuaXNBcnJheShyZXN1bHRzKSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICBgdXJsICR7dXJsfSBoYXMgbGlzdCByZXN1bHRzIHdoZW4gc2luZ2xlIHJlc3VsdCBpcyBleHBlY3RlZGAsXG4gICAgICApO1xuICAgIH1cbiAgICBpZiAocmVzdWx0cyA9PT0gdW5kZWZpbmVkKSByZXR1cm4gbnVsbDtcbiAgICBpZCA9IHJlc3VsdHM7XG4gIH1cbiAgY29uc3QgcmVzb3VyY2VFbnRpdHlTZWN0aW9uID0gc3RhdGUuZW50aXRpZXNbTW9kZWwudXJsUm9vdF07XG4gIGlmICghcmVzb3VyY2VFbnRpdHlTZWN0aW9uKSByZXR1cm4gbnVsbDtcbiAgY29uc3QgaW5zdGFuY2UgPSByZXNvdXJjZUVudGl0eVNlY3Rpb25baWRdO1xuICBpZiAoIWluc3RhbmNlKSByZXR1cm4gbnVsbDtcbiAgaWYgKCEoaW5zdGFuY2UgaW5zdGFuY2VvZiBNb2RlbCkpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYGVudGl0eSBvZiB3cm9uZyB0eXBlIGZvdW5kIGZvciAke01vZGVsLnVybFJvb3R9IDogJHtpZH1gKTtcbiAgfVxuICByZXR1cm4gaW5zdGFuY2UgYXMgQWJzdHJhY3RJbnN0YW5jZVR5cGU8VD47XG59XG4iXX0=
{
"name": "rest-hooks",
"version": "0.0.10",
"version": "0.1.0",
"description": "Easy react hooks for REST apis",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -27,2 +27,3 @@ # Rest hooks: Data fetching and binding hooks

* Authentication
* [Fetching multiple resources at once](docs/guides/fetch-multiple.md)
* Performance Optimizations (optional)

@@ -29,0 +30,0 @@ * [Nesting related resources (server-side join)](docs/guides/nested-response.md)

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