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

fortune-json-api

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fortune-json-api - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

8

dist/lib/index.js

@@ -362,10 +362,9 @@ 'use strict';

if (_settings.reservedKeys.attributes in record) for (var field in record[_settings.reservedKeys.attributes]) {
var value = record[_settings.reservedKeys.attributes][field];
var fieldDefinition = fields[field] || {};
var fieldType = fieldDefinition[keys.type];
var fieldIsArray = fieldDefinition[keys.isArray];
var value = record[_settings.reservedKeys.attributes][field];
if (inflectKeys) field = _inflection2['default'].camelize((0, _helpers.under)(field), true);
clone[field] = fieldIsArray ? value.map(cast(fieldType, options)) : castValue(value, fieldType, options);
clone[field] = Array.isArray(value) ? value.map(cast(fieldType, options)) : castValue(value, fieldType, options);
}

@@ -476,7 +475,6 @@

var fieldType = fieldDefinition[keys.type];
var fieldIsArray = fieldDefinition[keys.isArray];
if (inflectKeys) field = _inflection2['default'].camelize((0, _helpers.under)(field), true);
replace[field] = fieldIsArray ? value.map(cast(fieldType, options)) : castValue(value, fieldType, options);
replace[field] = Array.isArray(value) ? value.map(cast(fieldType, options)) : castValue(value, fieldType, options);
}

@@ -483,0 +481,0 @@

@@ -311,10 +311,9 @@ import uriTemplates from 'uri-templates'

for (let field in record[reservedKeys.attributes]) {
const value = record[reservedKeys.attributes][field]
const fieldDefinition = fields[field] || {}
const fieldType = fieldDefinition[keys.type]
const fieldIsArray = fieldDefinition[keys.isArray]
const value = record[reservedKeys.attributes][field]
if (inflectKeys) field = inflection.camelize(under(field), true)
clone[field] = fieldIsArray ?
clone[field] = Array.isArray(value) ?
value.map(cast(fieldType, options)) :

@@ -398,7 +397,6 @@ castValue(value, fieldType, options)

const fieldType = fieldDefinition[keys.type]
const fieldIsArray = fieldDefinition[keys.isArray]
if (inflectKeys) field = inflection.camelize(under(field), true)
replace[field] = fieldIsArray ?
replace[field] = Array.isArray(value) ?
value.map(cast(fieldType, options)) :

@@ -405,0 +403,0 @@ castValue(value, fieldType, options)

{
"name": "fortune-json-api",
"description": "JSON API serializer for Fortune.",
"version": "1.1.2",
"version": "1.1.3",
"license": "MIT",

@@ -6,0 +6,0 @@ "author": {

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