Comparing version 1.9.1 to 1.9.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JsonDeserializer = void 0; | ||
var JsonDeserializer = /** @class */ (function () { | ||
@@ -4,0 +5,0 @@ function JsonDeserializer(propertiesMapper, deserializeCache, options) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ModelsSerializer = void 0; | ||
var utils_1 = require("../utils"); | ||
@@ -4,0 +5,0 @@ var ModelsSerializer = /** @class */ (function () { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DeserializeCache = exports.jsonStringify = void 0; | ||
function jsonStringify(json) { | ||
@@ -4,0 +5,0 @@ var stringified; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SwitchCaseJsonMapper = exports.SwitchCaseModelMapper = exports.JsonPropertiesMapper = exports.ModelPropertiesMapper = exports.JsonDeserializer = exports.ModelsSerializer = exports.Jsona = void 0; | ||
var Jsona_1 = require("./Jsona"); | ||
@@ -10,8 +11,8 @@ exports.Jsona = Jsona_1.default; | ||
var simplePropertyMappers_1 = require("./simplePropertyMappers"); | ||
exports.ModelPropertiesMapper = simplePropertyMappers_1.ModelPropertiesMapper; | ||
exports.JsonPropertiesMapper = simplePropertyMappers_1.JsonPropertiesMapper; | ||
Object.defineProperty(exports, "ModelPropertiesMapper", { enumerable: true, get: function () { return simplePropertyMappers_1.ModelPropertiesMapper; } }); | ||
Object.defineProperty(exports, "JsonPropertiesMapper", { enumerable: true, get: function () { return simplePropertyMappers_1.JsonPropertiesMapper; } }); | ||
var switchCasePropertyMappers_1 = require("./switchCasePropertyMappers"); | ||
exports.SwitchCaseModelMapper = switchCasePropertyMappers_1.SwitchCaseModelMapper; | ||
exports.SwitchCaseJsonMapper = switchCasePropertyMappers_1.SwitchCaseJsonMapper; | ||
Object.defineProperty(exports, "SwitchCaseModelMapper", { enumerable: true, get: function () { return switchCasePropertyMappers_1.SwitchCaseModelMapper; } }); | ||
Object.defineProperty(exports, "SwitchCaseJsonMapper", { enumerable: true, get: function () { return switchCasePropertyMappers_1.SwitchCaseJsonMapper; } }); | ||
exports.default = Jsona_1.default; | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JsonPropertiesMapper = exports.defineRelationGetter = exports.ModelPropertiesMapper = exports.RELATIONSHIP_NAMES_PROP = void 0; | ||
exports.RELATIONSHIP_NAMES_PROP = 'relationshipNames'; | ||
@@ -106,3 +105,3 @@ var ModelPropertiesMapper = /** @class */ (function () { | ||
if (currentNames && currentNames.length) { | ||
model[exports.RELATIONSHIP_NAMES_PROP] = __spreadArrays(currentNames, newNames).filter(function (value, i, self) { return self.indexOf(value) === i; }); | ||
model[exports.RELATIONSHIP_NAMES_PROP] = __spreadArray(__spreadArray([], currentNames), newNames).filter(function (value, i, self) { return self.indexOf(value) === i; }); | ||
} | ||
@@ -109,0 +108,0 @@ else { |
@@ -6,6 +6,8 @@ "use strict"; | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -17,2 +19,3 @@ function __() { this.constructor = d; } | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SwitchCaseJsonMapper = exports.SwitchCaseModelMapper = void 0; | ||
var _1 = require("./"); | ||
@@ -19,0 +22,0 @@ var simplePropertyMappers_1 = require("./simplePropertyMappers"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.jsonParse = exports.createIncludeNamesTree = void 0; | ||
function createIncludeNamesTree(namesChain, includeTree) { | ||
@@ -4,0 +5,0 @@ var namesArray = namesChain.split('.'); |
{ | ||
"name": "jsona", | ||
"description": "Provide data formatters (data model builder & json builder) to work with JSON API specification v1.0 in your JavaScript / TypeScript code", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"keywords": [ | ||
@@ -48,6 +48,6 @@ "json-api", | ||
"@types/node": "^12.11.5", | ||
"chai": "^4.0.0", | ||
"mocha": "^3.4.2", | ||
"ts-mocha": "^1.0.3", | ||
"typescript": "^3.6.4" | ||
"chai": "^4.3.4", | ||
"mocha": "^8.3.2", | ||
"ts-mocha": "^8.0.0", | ||
"typescript": "^4.2.4" | ||
}, | ||
@@ -54,0 +54,0 @@ "scripts": { |
@@ -30,3 +30,3 @@ # Jsona | ||
``` | ||
npm install jsona | ||
npm i jsona --save | ||
``` | ||
@@ -33,0 +33,0 @@ or |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93585
1233