{"_id":"@art-suite/art-models","_rev":"5-fe78936fedf5b3eb6e7601efe8fd1301","name":"@art-suite/art-models","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.2":{"bugs":{"url":"https://github.com/art-suite/art-suite-applications/issues"},"dependencies":{"@art-suite/instance-function-binding-mixin":"^1.0.0","art-class-system":"^1.11.13","art-communication-status":"^1.5.13","art-epoched-state":"^1.2.12","art-standard-lib":"^1.70.6","neptune-namespaces-runtime":"^3.2.9"},"homepage":"https://github.com/art-suite/art-suite-applications","jest":{"collectCoverageFrom":["build/**/*.js","!build/test/**/*.js"],"testEnvironment":"node"},"license":"ISC","name":"@art-suite/art-models","repository":{"type":"git","url":"git+https://github.com/art-suite/art-suite-applications.git"},"scripts":{"build":"coffee -m --output build --compile source &\nCOFFEE_PID=$!\ncaf -m -c source -o build &\nCAF_PID=$!\nwait $COFFEE_PID || exit 1\nwait $CAF_PID || exit 1\nnpm run nn","build-clean":"npm run clean; npm run build","clean":"rm -rf build/*","nn":"nn build/* ","test":"npm run nn\njest","watch":"npm-watch"},"version":"0.1.2","sourceDir":"source","targetDir":"build","watch":{"build":{"extensions":["caf","coffee"],"patterns":["source"],"quiet":false}},"description":"ArtModels are a simple, elegant solution to the following design problems:","_id":"@art-suite/art-models@0.1.2","_nodeVersion":"14.17.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-mL3FeVhdO7Ps62q+vkTZuELCybN0IP0yN7JsrxT3EXL79Mpri+PzSSizYqX/KEnVwNVisi2d5r+MLkgp/TqLxg==","shasum":"75c8c1d1a547ac9616de1fe453f4ced80e5e96f8","tarball":"https://registry.npmjs.org/@art-suite/art-models/-/art-models-0.1.2.tgz","fileCount":35,"unpackedSize":104397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJeN0CRA9TVsSAnZWagAABxQP/R4I+KGsYlSLO+Rve815\nd2ssiX4Nux1pGt3jgZMBNAz/mqgVvOZMC/bfUW7s9lDGjC5RT44/Ozq3cRHy\nPJt4kCJYU3fAPSdC4KQGU+t7oJt9KNo/Mo52oB2ymLkHco/vJpQyFzFOVwHR\nljkFRFQT7d+H58TdPBPyhEb7mBRzi+0Ah6DYXcm3PC3BaeB46+fR8dyLIX9f\nwLxkuUHCDCb61HnkIex1Rs0WNpJsvt2eZ3hVTTqPCO4pZz2f8YmAI9z/GboJ\nXRkt9cr6wv9vqW6lMbJq7fKHSdo9oeip90A4t+B1XrDbDLc+huQ01MtLyvYx\nc0gidNiXkq3egEEmSFMGrW2vWPbYf8aMhiPhlwHlP2FcEb3UeqrIxmASEF5i\nWr+zISyDbXqTohhwqTN7+cUjs81yGRMimj10qC5kpggAvVdCC92l3lUqb2jV\nnWGHIDnFw5B5DTmRVWS9mypk1wtti2+VWz2RBpX2oVOJ72vepS1nHNHNmk8h\nbohiNpx31kbcIbJ36bHr61LRxl3o386josP9wbLNlPsW+Dmv7nI/u/6p3DMz\n4BsYZSUKfxxNwaQA6ENfkmd8DiG34pwjx/9Q9f8xMOvbgF4Wyd11UAy2DQpn\nHmWlyScRlwfQFRP7n/XzdRxZ4ei8+wTQBivSAz+gGxa27tbUzZyAFGgkFe0Q\nHSw7\r\n=x56u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFFnS3lvTaBMlYuIQFiU6Jxu4xDkSrITACxZgmHB/h/AiEAuL5iZgMxsiPDCA6s50K1QFzxagKAkR5mVGXk3aD/Esw="}]},"_npmUser":{"name":"shanebdavis","email":"shanebdavis@gmail.com"},"directories":{},"maintainers":[{"name":"shanebdavis","email":"shanebdavis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/art-models_0.1.2_1629873011922_0.6008599590373487"},"_hasShrinkwrap":false},"0.1.3":{"bugs":{"url":"https://github.com/art-suite/art-suite-applications/issues"},"dependencies":{"@art-suite/instance-function-binding-mixin":"^1.0.0","art-class-system":"^1.11.13","art-communication-status":"^1.5.13","art-epoched-state":"^1.2.12","art-standard-lib":"^1.70.6","neptune-namespaces-runtime":"^3.2.9"},"homepage":"https://github.com/art-suite/art-suite-applications","jest":{"collectCoverageFrom":["build/**/*.js","!build/test/**/*.js"],"testEnvironment":"node"},"license":"ISC","name":"@art-suite/art-models","repository":{"type":"git","url":"git+https://github.com/art-suite/art-suite-applications.git"},"scripts":{"build":"coffee -m --output build --compile source &\nCOFFEE_PID=$!\ncaf -m -c source -o build &\nCAF_PID=$!\nwait $COFFEE_PID || exit 1\nwait $CAF_PID || exit 1\nnpm run nn","build-clean":"npm run clean; npm run build","clean":"rm -rf build/*","nn":"nn build/* ","test":"npm run nn\njest","watch":"npm-watch"},"version":"0.1.3","sourceDir":"source","targetDir":"build","watch":{"build":{"extensions":["caf","coffee"],"patterns":["source"],"quiet":false}},"gitHead":"09055e7cbd5743154a59b2d7bd6326e57a9b433a","description":"ArtModels are a simple, elegant solution to the following design problems:","_id":"@art-suite/art-models@0.1.3","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-E0Of9SJJCdvADotM9MgrnaKXrzdtOQhuUT1taa/mZP7LpwvQMDNE6ImCQJVsmjcWf+fRguOrdhlPAD9vqFLY+Q==","shasum":"437c220901f17f4540363038171074c1bbb94fe4","tarball":"https://registry.npmjs.org/@art-suite/art-models/-/art-models-0.1.3.tgz","fileCount":35,"unpackedSize":84589,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwGZhzgyXPvdnKCllVA/FsC/nkgXg5xTRgSS2vXEzFeAiEAgjVuH6wkyE1GkcHrCLu8NfXCsJmhocELE4dqf/A6UpA="}]},"_npmUser":{"name":"shanebdavis","email":"shanebdavis@gmail.com"},"directories":{},"maintainers":[{"name":"shanebdavis","email":"shanebdavis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/art-models_0.1.3_1697793279145_0.3888303299939537"},"_hasShrinkwrap":false},"0.2.0":{"bugs":{"url":"https://github.com/art-suite/art-suite-applications/issues"},"dependencies":{"@art-suite/instance-function-binding-mixin":"^1.0.0","art-class-system":"^1.11.13","art-communication-status":"^1.5.13","art-epoched-state":"^1.2.12","art-standard-lib":"^1.70.6","neptune-namespaces-runtime":"^3.2.9"},"homepage":"https://github.com/art-suite/art-suite-applications","jest":{"collectCoverageFrom":["build/**/*.js","!build/test/**/*.js"],"testEnvironment":"node","testPathIgnorePatterns":["/node_modules/","<rootDir>/test"],"verbose":true},"license":"ISC","name":"@art-suite/art-models","repository":{"type":"git","url":"git+https://github.com/art-suite/art-suite-applications.git"},"scripts":{"build":"cd source\nfind . -name '*.js' -o -name '*.css' | cpio -vpdm ../build\ncd ..\ncaf -m -c source -o build\nnpm run nn","build-clean":"# BUILD CLEAN START\n#   - building into: build-temp\n#\nrm -rf ./__build-old__\ncd source\nfind . -name '*.js' -o -name '*.css' | cpio -vpdm ../build-temp\ncd ..\ncaf -m -c source -o build-temp\nnpm run nn\n\nnn build-temp/*\n\n# BUILD CLEAN FINIALIZING\n#  - replace old build in:   build\n#  - with new build from:    build-temp\n#\nmv build __build-old__\nmv build-temp build\nrm -rf ./__build-old__","clean":"rm -rf build/*","jest":"jest --reporters=jest-fixed-default-reporter/SummaryReporter","nn":"nn build/* ","test":"npm run nn\njest","watch":"npm-watch"},"sourceDir":"source","targetDir":"build","version":"0.2.0","watch":{"build":{"extensions":["caf"],"patterns":["source"],"quiet":false}},"gitHead":"5b221ddd88069d7be62113c2c0e90b46865f59da","description":"ArtModels are a simple, elegant solution to the following design problems:","_id":"@art-suite/art-models@0.2.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-fPOfqvIj54YqyrlRpnW+pgrWSLAzkC+g2Cl9AFkAGGHoXStmit+Xibh5BTmjBbDoccfdMEJWEqh27S4vcbLzQQ==","shasum":"ff44240c6d95134f14b26a53cba9e2c177aea4a0","tarball":"https://registry.npmjs.org/@art-suite/art-models/-/art-models-0.2.0.tgz","fileCount":35,"unpackedSize":85719,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIIfaZarwiIwAlmz2sLRJchYkmungmwasqRP3unkTRKQIhAObuMADJ2tbBXt0gQy7L7eNKi87Dg/vXKxt0oOUJpNCp"}]},"_npmUser":{"name":"shanebdavis","email":"shanebdavis@gmail.com"},"directories":{},"maintainers":[{"name":"shanebdavis","email":"shanebdavis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/art-models_0.2.0_1699793994182_0.42341335014254544"},"_hasShrinkwrap":false},"0.1.4":{"bugs":{"url":"https://github.com/art-suite/art-suite-applications/issues"},"dependencies":{"@art-suite/instance-function-binding-mixin":"^1.0.0","art-class-system":"^1.11.13","art-communication-status":"^1.5.13","art-epoched-state":"^1.2.12","art-standard-lib":"^1.70.6","neptune-namespaces-runtime":"^3.2.9"},"homepage":"https://github.com/art-suite/art-suite-applications","jest":{"collectCoverageFrom":["build/**/*.js","!build/test/**/*.js"],"testEnvironment":"node"},"license":"ISC","name":"@art-suite/art-models","repository":{"type":"git","url":"git+https://github.com/art-suite/art-suite-applications.git"},"scripts":{"build":"coffee -m --output build --compile source &\nCOFFEE_PID=$!\ncaf -m -c source -o build &\nCAF_PID=$!\nwait $COFFEE_PID || exit 1\nwait $CAF_PID || exit 1\nnpm run nn","build-clean":"npm run clean; npm run build","clean":"rm -rf build/*","nn":"nn build/* ","test":"npm run nn\njest","watch":"npm-watch"},"version":"0.1.4","sourceDir":"source","targetDir":"build","watch":{"build":{"extensions":["caf","coffee"],"patterns":["source"],"quiet":false}},"gitHead":"963eaf29afb160de577403a362d602059e4f68b9","description":"ArtModels are a simple, elegant solution to the following design problems:","_id":"@art-suite/art-models@0.1.4","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-DJ8hadxTIdzLctsXTOtnkEgq42LC3JedGMi+KSdBoNUNTprHVFcwtxNlIY2KfAjSGdfJknf4dJVR8Fp2h8amQg==","shasum":"1af46f28af57cabae8b4954da2ba26491d6b5630","tarball":"https://registry.npmjs.org/@art-suite/art-models/-/art-models-0.1.4.tgz","fileCount":35,"unpackedSize":104781,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1EGQmRwP8fIf1Y8dG/4CJtYTUVPl4KTmoyrcI2numLAiAfYsEvfju4V8YJH6HtIcYFOj6UPvNhUNrg/nrTLP6J0g=="}]},"_npmUser":{"name":"shanebdavis","email":"shanebdavis@gmail.com"},"directories":{},"maintainers":[{"name":"shanebdavis","email":"shanebdavis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/art-models_0.1.4_1701685037079_0.5288956591232938"},"_hasShrinkwrap":false},"0.1.5":{"bugs":{"url":"https://github.com/art-suite/art-suite-applications/issues"},"dependencies":{"@art-suite/instance-function-binding-mixin":"^1.0.0","art-class-system":"^1.11.13","art-communication-status":"^1.5.13","art-epoched-state":"^1.2.12","art-standard-lib":"^1.70.6","neptune-namespaces-runtime":"^3.2.9"},"homepage":"https://github.com/art-suite/art-suite-applications","jest":{"collectCoverageFrom":["build/**/*.js","!build/test/**/*.js"],"testEnvironment":"node"},"license":"ISC","name":"@art-suite/art-models","repository":{"type":"git","url":"git+https://github.com/art-suite/art-suite-applications.git"},"scripts":{"build":"coffee -m --output build --compile source &\nCOFFEE_PID=$!\ncaf -m -c source -o build &\nCAF_PID=$!\nwait $COFFEE_PID || exit 1\nwait $CAF_PID || exit 1\nnpm run nn","build-clean":"npm run clean; npm run build","clean":"rm -rf build/*","nn":"nn build/* ","test":"npm run nn\njest","watch":"npm-watch"},"version":"0.1.5","sourceDir":"source","targetDir":"build","watch":{"build":{"extensions":["caf","coffee"],"patterns":["source"],"quiet":false}},"gitHead":"c79c160f0092482457a2bed6a747a97562a5d38e","description":"ArtModels are a simple, elegant solution to the following design problems:","_id":"@art-suite/art-models@0.1.5","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-XkzhIpLiLoqMDlbfVYt7bSbLSqcSpQtRlkJZQHp5T3ejXVlziZFn0GEwHDAhc2oH55hUGj9WLBz/WvYYPSXDoQ==","shasum":"015fc2ac54063cb1fc75b10bf3db22b861615fc0","tarball":"https://registry.npmjs.org/@art-suite/art-models/-/art-models-0.1.5.tgz","fileCount":35,"unpackedSize":104825,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCori/08HFhQq8Churm41tomDlGDdHMN3Hmg4FaDoCkXQIgIKBBZU75WMciw9wwa5miQPz67ZFAEtNdUM6Uz5Y9xdk="}]},"_npmUser":{"name":"shanebdavis","email":"shanebdavis@gmail.com"},"directories":{},"maintainers":[{"name":"shanebdavis","email":"shanebdavis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/art-models_0.1.5_1702306910879_0.41137279036011143"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-25T06:30:11.843Z","0.1.2":"2021-08-25T06:30:12.068Z","modified":"2023-12-11T15:01:51.306Z","0.1.3":"2023-10-20T09:14:39.437Z","0.2.0":"2023-11-12T12:59:54.421Z","0.1.4":"2023-12-04T10:17:17.279Z","0.1.5":"2023-12-11T15:01:51.096Z"},"maintainers":[{"name":"shanebdavis","email":"shanebdavis@gmail.com"}],"description":"ArtModels are a simple, elegant solution to the following design problems:","homepage":"https://github.com/art-suite/art-suite-applications","repository":{"type":"git","url":"git+https://github.com/art-suite/art-suite-applications.git"},"bugs":{"url":"https://github.com/art-suite/art-suite-applications/issues"},"license":"ISC","readme":"# Art-Suite: ArtModels\n\nArtModels are a simple, elegant solution to the following design problems:\n\n- (ArtReact or React) Components can subscribe to remote or shared data\n- Subscribing Components' states are automatically updated:\n  - if the status of the initial request changes\n  - as the initial request makes progress\n  - whenever the data changes\n- If the data is available immediately upon component instantiation, the component’s first render will reflect that data.\n- Data is addressed by model-name and key-string.\n  - Non-string keys are supported via custom `dataToKeyString` or `toKeyString` methods.\n- Model and subscription definitions are simple and lean.\n- Mutations are available as simple functions attached to each model.\n\n## See\n\n* [Subscription Declarations](#subscription-declarations)\n* [Model Subscriptions](#Model-Subscriptions)\n* [ArtModels Conventions](#flux-conventions)\n\n## How It Works\n\nThere are two main parts to ArtModels, and the Store:\n\n![](/Imikimi-LLC/art-flux/wiki/images/art-flux-nodes.png)\n\nUsing ArtModels consists of registering one or more ArtModels and then subscribe to data provided by those models.\n\nBehind the scenes, the Store, a singleton class, manages all component subscriptions and provides epoch state updates. Epoch state updates queue all state changes in ArtModels turing a time unit, usually one animation frame, and  applies them atomically to the Store's internal state. Immediately after the internal state update, Store notifies all subscribers of changes.\n\nNew subscriptions to data not currently in the Store indirectly cause loads to be invoked on the appropriate models. ArtModels are responsible for updating the Store on the progress of those loads and the final result. ArtModels can later update the Store if that data is updated locally or remotely.\n\nWhen all subscribers to a particular piece of data go away, the Store releases the data. In this way the Store only keeps in memory what is actually being used by active subscribers. Using the ModelSubscribersMixin makes tracking active subscribers easy.\n\n![](/Imikimi-LLC/art-flux/wiki/images/art-flux-lines.png)\n\nThe diagram above shows typical method invocations that cause data to flow around the data-flow loop. Only the `myModel.myMutator` needs to be invoked in your application code. Subscribers are automatically updated, and standard ArtModels take care of updating the Store for you.\n\n# Example\n\nTo use ArtModels, create your a custom model and custom Component with a subscription to the model:\n\n```coffeescript\n# models/nav_state.caf\nimport &@ArtModels\n\nclass NavState extends ApplicationState\n  @stateFields currentTab: :home\n\n  nextTab: ->\n    @currentTab =\n      switch @currentTab\n      when :home then :search\n      else :home\n```\n\n```coffeescript\n# components/my_component.caf\nimport &@ArtModels\n\n# class Component\n#   setState: (key, value) -> ...\n\nclass UserView extends ModelSubscriptionsMixin Component\n  @subscriptions :navState.currentTab\n```\n\n# Subscription Declarations\n\n@subscriptions takes an object as input with each entry describing one subscription.\n\nA subscription consists of 3 parts:\n\n* stateField:   the field in @state which will be set with the subscribed-to data\n* model:        the subscribed-to model (from the ModelRegistry)\n* key:          key for the specific, subscribed-to data in the model\n\nThere are many different ways to define the subscription, shown below.\n\n### Subscription Declarations, Object Forms\n\n### Fully Explicit\n\n```coffeescript\n  @subscriptions\n    stateField:\n      model: \"modelName\", model-instance or (props) -> \"modelName\"\n      key:   \"key\",       key-object     or (props) -> \"key\" or key-object\n```\n\n### Model-name == StateField-name with Explicit, Constant Key\n\n```coffeescript\n@subscriptions\n  stateField: constantKey\n```\n\nis equivalent to:\n\n```coffeescript\n@subscriptions\n  stateField:\n    model:  'stateField'\n    key:    constantKey\n```\n\n### Model-name == StateField-name with Key-Function\n\n```coffeescript\n@subscriptions\n  stateField: (props) -> # return key\n```\n\nis equivalent to:\n\n```coffeescript\n@subscriptions\n  stateField:\n    model:  'stateField'\n    key:    (props) -> # return key\n```\n\nExample:\n\n```coffeescript\n@subscriptions\n  user: (props) -> props.userId\n\n# Or, using coffeescript shorthand:\n@subscriptions\n  user: ({userId}) -> userId\n```\n\n### Subscription Declarations, String Forms\n\nIn addition to declaring subscriptions with object-notation, you can also use a simple string for common subscription-types. A subscription-string can contain one or more subscription declarations separated by spaces or commas.\n\n### Model Form\n\nThis form is useful for subscribing to a single record from a table. This pattern works best if you follow the [[ArtModels Conventions]].\n\n```coffeescript\n@subscriptions \"myField\"\n```\n\nis equivalent to:\n\n```coffeescript\n@subscriptions\n  myField:\n    model:  'myField'\n    key:    ({myField, myFieldId}) -> myField?.id || myFieldId\n```\n\nExample:\n\n```coffeescript\n@subscriptions \"post\"\n\n#is short for:\n@subscriptions\n  post:\n    model:  \"post\"\n    key:    ({post, postId}) -> post?.id || postId\n```\n\n### Model.Key form\n\nThis form is useful for subscribing to a specific, known key. In particularly, this works well with ApplicationState models.\n\n```coffeescript\n@subscriptions \"modelName.fieldName\"\n```\n\nis equivalent to:\n\n```coffeescript\n@subscriptions\n  fieldName:\n    key: fieldName\n    model: modelName\n```\n\n### Model-By form\n\n### Key functions\n\nIf the key or model is a function, the function:\n\n* is executed without @ set\n* inputs: (props) - the component\n* outputs: key or modelName respectively\n\n```coffeescript\n###\nIN: props is the component instance's @props\n@/THIS: not set\nOUT: key\n###\n(props) -> key\n```\n\nKey-functions are called initially during getInitialState to set up initial\nsubscriptions.\n\nIf the key-function returns null, all dependent state fields will be set to\nnull. No other action will be taken.\n\nWhenever @props changes (e.g. when componentWillReceiveProps is called), these\nkey-functions are re-evaluated. If the return value changes, subscriptions are\nupdated and new data is requested where needed.\n\n# Model Subscriptions\n\nDeclaring a subscription in an object extending ModelSubscriptionsMixin has a few important effects. For a given subscription with a state-field name 'myStatefield':\n\n* defines the getter: `@myStatefield`\n* sets multiple fields on @state:\n  * @state.myStateField - the current value from the subscription or null if no value has been fetched\n  * @state.myStateFieldStatus - (string) the current status of fetching the value for the subscription (see Art.Founcation.ConnectionStatus)\n  * @state.myStateFieldProgress - (number between 0 and 1) the current progress fetching the value for the subscription\n\nExample\n```coffeescript\nclass UserView extends ModelSubscriptionsMixin Object\n  @subscriptions \"user\"\n\n  render: ->\n    TextElement\n      text: @user?.name || @state.userStatus\n\n```\n\n# ArtModels Conventions\n\n* model-names which represent tables of records should be singular. Examples:\n  - user\n  - post\n  - comment\n* Keys for records are called \"ids.\" When passing an id as a prop to a component, name it the model-name plus 'Id'. Examples:\n  - userId\n  - postId\n  - commentId\n\nIf you follow these patterns, your subscription declarations are nice and concise. Example:\n\n```coffeescript\nclass UserView extends ModelSubscriptionsMixin Object\n  @subscriptions :user :post\n```\n\nBy default, the name of the subscription-field is used to find the model, and the model's `propsToKey`\nfunction is used to extract the key from props. It's equivalent to:\n\n```coffeescript\nclass UserView extends ModelSubscriptionsMixin Object\n  @subscriptions\n    user:\n      model:  :user\n      key:    ({user, userId}) -> user?.id || userId\n\n    post:\n      model:  :user\n      key:    ({post, postId}) -> post?.id || postId\n```","readmeFilename":"README.md"}