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

jsona

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsona - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "jsona",
"description": "Framework agnostic library that provide systemized way to work with JSON API specification v1.0 in your JavaScript / TypeScript code",
"version": "1.0.1",
"version": "1.0.2",
"keywords": [

@@ -6,0 +6,0 @@ "json api",

@@ -19,3 +19,3 @@ # Jsona

##### deserialize - creates simplified object(s) from json
#### deserialize - creates simplified object(s) from json
```javascript

@@ -61,3 +61,3 @@ const json = {

##### serialize - creates json from simplified object(s)
#### serialize - creates json from simplified object(s)
```javascript

@@ -95,3 +95,3 @@ const newJson = dataFormatter.serialize({

##### denormalizeReduxObject - creates simplified object(s) from reduxObject
#### denormalizeReduxObject - creates simplified object(s) from reduxObject
"reduxObject" - result object of [json-api-normalizer](https://github.com/yury-dymov/json-api-normalizer)

@@ -101,3 +101,3 @@

const reduxObject = reduxStore.entities; // depends on where you store it
const model = dataFormatter.denormalizeReduxObject({reduxObject, 'town', '123');
const model = dataFormatter.denormalizeReduxObject({reduxObject, entityType: 'town', entityIds: '123'});
console.log(newJson); // if there is such town and country in reduxObject, it will output:

@@ -116,3 +116,3 @@ /* {

*NOTE:* You can control process of building this objects, just use your own [propertyMappers](https://github.com/olosegres/jsona/src/simplePropertyMappers.js) when Jsona instantiates.
*NOTE:* You can control process of building this objects, just use your own [propertyMappers](src/simplePropertyMappers.js) when Jsona instantiates.
So, it may be easier to use, if you will create a proxy module in your project, something like this:

@@ -119,0 +119,0 @@ ```javascript

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