kitsu-core
Advanced tools
Comparing version 9.1.22 to 9.1.23
@@ -6,2 +6,11 @@ # Change Log | ||
## [9.1.23](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/compare/v9.1.22...v9.1.23) (2022-01-23) | ||
**Note:** Version bump only for package kitsu-core | ||
## [9.1.22](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/compare/v9.1.21...v9.1.22) (2021-11-02) | ||
@@ -8,0 +17,0 @@ |
@@ -7,8 +7,6 @@ 'use strict'; | ||
function filterIncludes(included, _ref) { | ||
let { | ||
id, | ||
type | ||
} = _ref; | ||
function filterIncludes(included, { | ||
id, | ||
type | ||
}) { | ||
try { | ||
@@ -15,0 +13,0 @@ if (id && type) { |
@@ -38,8 +38,6 @@ (function (global, factory) { | ||
function filterIncludes(included, _ref) { | ||
let { | ||
id, | ||
type | ||
} = _ref; | ||
function filterIncludes(included, { | ||
id, | ||
type | ||
}) { | ||
try { | ||
@@ -62,8 +60,7 @@ if (id && type) { | ||
function link(_ref, included) { | ||
let { | ||
id, | ||
type, | ||
meta | ||
} = _ref; | ||
function link({ | ||
id, | ||
type, | ||
meta | ||
}, included) { | ||
const filtered = filterIncludes(included, { | ||
@@ -103,4 +100,3 @@ id, | ||
function linkRelationships(data) { | ||
let included = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
function linkRelationships(data, included = []) { | ||
const { | ||
@@ -154,4 +150,3 @@ relationships | ||
function query(params) { | ||
let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
function query(params, prefix = null) { | ||
const str = []; | ||
@@ -245,8 +240,7 @@ | ||
data.relationships[key] = { | ||
data: node.map(_ref => { | ||
let { | ||
id, | ||
type, | ||
...attributes | ||
} = _ref; | ||
data: node.map(({ | ||
id, | ||
type, | ||
...attributes | ||
}) => { | ||
return { | ||
@@ -312,7 +306,3 @@ id, | ||
function serialise(type) { | ||
let data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
let method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'POST'; | ||
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
function serialise(type, data = {}, method = 'POST', options = {}) { | ||
try { | ||
@@ -330,4 +320,3 @@ if (!options.camelCaseTypes) options.camelCaseTypes = s => s; | ||
function splitModel(url) { | ||
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
function splitModel(url, options = {}) { | ||
if (!options.pluralModel) options.pluralModel = s => s; | ||
@@ -334,0 +323,0 @@ if (!options.resourceCase) options.resourceCase = s => s; |
@@ -16,4 +16,3 @@ 'use strict'; | ||
function splitModel(url) { | ||
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
function splitModel(url, options = {}) { | ||
if (!options.pluralModel) options.pluralModel = s => s; | ||
@@ -20,0 +19,0 @@ if (!options.resourceCase) options.resourceCase = s => s; |
@@ -9,8 +9,7 @@ 'use strict'; | ||
function link(_ref, included) { | ||
let { | ||
id, | ||
type, | ||
meta | ||
} = _ref; | ||
function link({ | ||
id, | ||
type, | ||
meta | ||
}, included) { | ||
const filtered = filterIncludes.filterIncludes(included, { | ||
@@ -50,4 +49,3 @@ id, | ||
function linkRelationships(data) { | ||
let included = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
function linkRelationships(data, included = []) { | ||
const { | ||
@@ -54,0 +52,0 @@ relationships |
@@ -9,4 +9,3 @@ 'use strict'; | ||
function query(params) { | ||
let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
function query(params, prefix = null) { | ||
const str = []; | ||
@@ -13,0 +12,0 @@ |
@@ -84,8 +84,7 @@ 'use strict'; | ||
data.relationships[key] = { | ||
data: node.map(_ref => { | ||
let { | ||
id, | ||
type, | ||
...attributes | ||
} = _ref; | ||
data: node.map(({ | ||
id, | ||
type, | ||
...attributes | ||
}) => { | ||
return { | ||
@@ -151,7 +150,3 @@ id, | ||
function serialise(type) { | ||
let data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
let method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'POST'; | ||
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
function serialise(type, data = {}, method = 'POST', options = {}) { | ||
try { | ||
@@ -158,0 +153,0 @@ if (!options.camelCaseTypes) options.camelCaseTypes = s => s; |
{ | ||
"version": "9.1.22", | ||
"version": "9.1.23", | ||
"name": "kitsu-core", | ||
@@ -4,0 +4,0 @@ "description": "Simple, lightweight & framework agnostic JSON:API (de)serialsation components", |
@@ -117,3 +117,3 @@ <h1 align=center>Kitsu Core</h1> | ||
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub") | ||
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub") | ||
@@ -160,3 +160,3 @@ Hoists attributes to be top-level | ||
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/deserialise/index.js#L57-L72 "Source code on GitHub") | ||
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/deserialise/index.js#L57-L72 "Source code on GitHub") | ||
@@ -211,3 +211,3 @@ Deserialises a JSON-API response | ||
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/error/index.js#L27-L33 "Source code on GitHub") | ||
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/error/index.js#L27-L33 "Source code on GitHub") | ||
@@ -249,3 +249,3 @@ Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller. | ||
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/filterIncludes/index.js#L33-L46 "Source code on GitHub") | ||
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/filterIncludes/index.js#L33-L46 "Source code on GitHub") | ||
@@ -290,3 +290,3 @@ Filters includes for the specific relationship requested | ||
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/linkRelationships/index.js#L97-L117 "Source code on GitHub") | ||
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/linkRelationships/index.js#L97-L117 "Source code on GitHub") | ||
@@ -329,3 +329,3 @@ Links relationships to included data | ||
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/query/index.js#L33-L44 "Source code on GitHub") | ||
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/query/index.js#L33-L44 "Source code on GitHub") | ||
@@ -358,3 +358,3 @@ Constructs a URL query string for JSON:API parameters | ||
[packages/kitsu-core/src/serialise/index.js:249-260](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/serialise/index.js#L249-L260 "Source code on GitHub") | ||
[packages/kitsu-core/src/serialise/index.js:249-260](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/serialise/index.js#L249-L260 "Source code on GitHub") | ||
@@ -404,3 +404,3 @@ Serialises an object into a JSON-API structure | ||
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/splitModel/index.js#L29-L39 "Source code on GitHub") | ||
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/splitModel/index.js#L29-L39 "Source code on GitHub") | ||
@@ -447,3 +447,3 @@ Split model name from the model's resource URL | ||
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub") | ||
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub") | ||
@@ -474,3 +474,3 @@ Converts kebab-case and snake_case into camelCase | ||
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub") | ||
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub") | ||
@@ -493,3 +493,3 @@ Converts camelCase into kebab-case | ||
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/f896cf6ca6ce2a30529f9d40e384e944170f4543/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub") | ||
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/60b2be15cce2e948e2dc05415ae49f21cf546615/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub") | ||
@@ -496,0 +496,0 @@ Converts camelCase into snake_case |
declare function _default(input: string): string; | ||
export default _default; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export * from "./deattribute"; |
declare function _default(input: string): string; | ||
export default _default; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
declare function _default(input: string): string; | ||
export default _default; |
@@ -0,0 +0,0 @@ /** |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
81847
1170