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

transformalizer

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transformalizer - npm Package Compare versions

Comparing version 0.1.4 to 1.0.0-beta.0

20

CHANGELOG.md

@@ -5,2 +5,22 @@ # Change Log

<a name="1.0.0-beta.0"></a>
# [1.0.0-beta.0](https://github.com/GaiamTV/transformalizer/compare/v0.1.4...v1.0.0-beta.0) (2017-06-20)
### Bug Fixes
* **docs:** update outdated docs, closes [#12](https://github.com/GaiamTV/transformalizer/issues/12) ([7daa893](https://github.com/GaiamTV/transformalizer/commit/7daa893))
### Features
* **state:** refactors options into options and state ([fb46919](https://github.com/GaiamTV/transformalizer/commit/fb46919))
### BREAKING CHANGES
* **state:** removes `clone` dependency and options immutability for performance improvements
<a name="0.1.4"></a>

@@ -7,0 +27,0 @@ ## [0.1.4](https://github.com/GaiamTV/transformalizer/compare/v0.1.3...v0.1.4) (2017-05-04)

27

dist/transformalizer.js

@@ -13,10 +13,4 @@ 'use strict';

var _clone = require('clone');
var _clone2 = _interopRequireDefault(_clone);
var _utils = require('./utils');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

@@ -77,5 +71,5 @@

}
var options = (0, _clone2.default)(Object.assign({}, baseOptions, opts));
var include = createInclude({ source: source, options: opts });
var data = transformSource({ docSchema: docSchema, source: source, options: opts, include: include });
var options = Object.assign({}, baseOptions, opts);
var include = createInclude({ source: source, options: options });
var data = transformSource({ docSchema: docSchema, source: source, options: options, include: include });
var included = include.get();

@@ -86,5 +80,4 @@ var document = {

}
};
// add top level properties if available
var topLevel = ['links', 'meta'];
// add top level properties if available
};var topLevel = ['links', 'meta'];
topLevel.forEach(function (prop) {

@@ -144,3 +137,3 @@ if (docSchema.schema[prop]) {

source = args.source,
opts = args.options,
options = args.options,
data = args.data,

@@ -154,3 +147,3 @@ include = args.include,

if ((0, _utils.isFunction)(docSchema.schema.data.dataSchema)) {
var name = docSchema.schema.data.dataSchema({ source: source, data: data, options: opts });
var name = docSchema.schema.data.dataSchema({ source: source, data: data, options: options });
if (name !== docSchema.name) {

@@ -163,4 +156,4 @@ dataSchema = registry[name];

}
var options = (0, _clone2.default)(Object.assign({}, baseOptions, opts));
var params = { dataSchema: dataSchema, source: source, options: options, data: data };
var state = {};
var params = { dataSchema: dataSchema, source: source, options: options, data: data, state: state };
var type = params.type = _type || getType(params);

@@ -499,2 +492,2 @@ var id = params.id = _id || getId(params);

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL2xpYi90cmFuc2Zvcm1hbGl6ZXIuanMiXSwibmFtZXMiOlsiY3JlYXRlVHJhbnNmb3JtYWxpemVyIiwiYmFzZU9wdGlvbnMiLCJyZWdpc3RyeSIsInJlZ2lzdGVyIiwibmFtZSIsInNjaGVtYSIsInNjaGVtYU9wdGlvbnMiLCJvcHRpb25zIiwiRXJyb3IiLCJ1bmRlZmluZWQiLCJ0cmFuc2Zvcm0iLCJzb3VyY2UiLCJvcHRzIiwiZG9jU2NoZW1hIiwiT2JqZWN0IiwiYXNzaWduIiwiaW5jbHVkZSIsImNyZWF0ZUluY2x1ZGUiLCJkYXRhIiwidHJhbnNmb3JtU291cmNlIiwiaW5jbHVkZWQiLCJnZXQiLCJkb2N1bWVudCIsImpzb25hcGkiLCJ2ZXJzaW9uIiwidG9wTGV2ZWwiLCJmb3JFYWNoIiwicHJvcCIsInJlc3VsdCIsImxlbmd0aCIsImFyZ3MiLCJBcnJheSIsImlzQXJyYXkiLCJtYXAiLCJ0cmFuc2Zvcm1EYXRhIiwiX3R5cGUiLCJfa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FJldHVybiB0aGUgaW5jbHVkZWQgYXJyYXkgaW4gaXRzIGN1cnJlbnQgc3RhdGVcbiAgICAgICAqIEByZXR1cm4ge09iamVjdFtdfVxuICAgICAgICovXG4gICAgICBnZXQoKSB7XG4gICAgICAgIHJldHVybiBpbmNsdWRlZFxuICAgICAgfSxcbiAgICB9XG4gIH1cblxuICByZXR1cm4ge1xuICAgIHJlZ2lzdGVyLFxuICAgIHRyYW5zZm9ybSxcbiAgfVxufVxuIl19
{
"name": "transformalizer",
"version": "0.1.4",
"version": "1.0.0-beta.0",
"description": "a bare bones node module for building JSON API v1.0 compliant payloads",

@@ -69,5 +69,4 @@ "main": "./dist/transformalizer.js",

"dependencies": {
"clone": "^2.1.0",
"source-map-support": "^0.4.11"
}
}

@@ -117,6 +117,6 @@ # transformalizer

{
links({ source, options, document }) {
links({ source, options, data, included }) {
return { /* top level links */ };
},
meta({ source, options, document }) {
meta({ source, options, data, included }) {
return { /* top level meta */ };

@@ -128,9 +128,9 @@ },

},
type({ source, options, data }) {
type({ source, options, data, state }) {
return 'my-type';
},
id({ source, options, data, type }) {
id({ source, options, data, type, state }) {
return data.id.toString();
},
attributes({ source, options, data, type, id }) {
attributes({ source, options, data, type, id, state }) {
return { /* resource attributes */ }

@@ -140,3 +140,3 @@ },

// ..
[key]({ source, options, data, type, id, attributes }) {
[key]({ source, options, data, type, id, attributes, state }) {
return {

@@ -154,6 +154,6 @@ data: {

},
links({ source, options, data, type, id, attributes, relationships }) {
links({ source, options, data, type, id, attributes, relationships, state }) {
return { /* resource links if available */ }
},
meta({ source, options, data, type, id, attributes, relationships }) {
meta({ source, options, data, type, id, attributes, relationships, state }) {
return { /* resource meta if available */ }

@@ -206,2 +206,3 @@ }

| params.data | Object | the current item being processed when source is an array, or the source itself if not an array |
| params.state | Object | the recommended namespace for passing information between data level methods, useful for storing calculated data that is needed in multiple places |

@@ -222,2 +223,3 @@ ---

| params.type | String | the resource type determined in the `data.type` step |
| params.state | Object | the recommended namespace for passing information between data level methods, useful for storing calculated data that is needed in multiple places |

@@ -239,2 +241,3 @@ ---

| params.id | String | the id of the current resource, determined in the `data.id` step |
| params.state | Object | the recommended namespace for passing information between data level methods, useful for storing calculated data that is needed in multiple places |

@@ -267,2 +270,3 @@ ---

| params.attributes | Object | the attributes object of the current resource, determined in the `data.attributes` step |
| params.state | Object | the recommended namespace for passing information between data level methods, useful for storing calculated data that is needed in multiple places |

@@ -286,2 +290,3 @@ ---

| params.relationships | Object | the relationships object of the current resource, determined in the `data.relationships` step |
| params.state | Object | the recommended namespace for passing information between data level methods, useful for storing calculated data that is needed in multiple places |

@@ -306,2 +311,3 @@ ---

| params.links | Object | the links object of the current resource, determined in the `data.links` step |
| params.state | Object | the recommended namespace for passing information between data level methods, useful for storing calculated data that is needed in multiple places |

@@ -308,0 +314,0 @@ ---

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