{"id":18909544,"url":"https://github.com/neovici/computing-lit-element","last_synced_at":"2025-04-15T06:29:32.850Z","repository":{"id":53157792,"uuid":"206104587","full_name":"Neovici/computing-lit-element","owner":"Neovici","description":"Polymer-style computed properties for lit-element + notify compat mixin","archived":false,"fork":false,"pushed_at":"2020-11-19T04:31:49.000Z","size":1886,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-13T10:44:06.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Neovici.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-03T15:01:06.000Z","updated_at":"2022-02-28T07:30:31.000Z","dependencies_parsed_at":"2022-08-20T02:31:39.951Z","dependency_job_id":null,"html_url":"https://github.com/Neovici/computing-lit-element","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neovici%2Fcomputing-lit-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neovici%2Fcomputing-lit-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neovici%2Fcomputing-lit-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neovici%2Fcomputing-lit-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Neovici","download_url":"https://codeload.github.com/Neovici/computing-lit-element/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249020327,"owners_count":21199542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T09:34:11.141Z","updated_at":"2025-04-15T06:29:32.834Z","avatar_url":"https://github.com/Neovici.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/Neovici/computing-lit-element/workflows/Github%20CI/badge.svg)](https://github.com/Neovici/computing-lit-element/actions?workflow=Github+CI)\n[![Maintainability](https://api.codeclimate.com/v1/badges/1e479d11b9dfd4af5331/maintainability)](https://codeclimate.com/github/Neovici/computing-lit-element/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/1e479d11b9dfd4af5331/test_coverage)](https://codeclimate.com/github/Neovici/computing-lit-element/test_coverage)\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/Neovici/computing-lit-element)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Depfu](https://badges.depfu.com/badges/3d9fdd93d2fed32ed7b0233a694a2b42/count.svg)](https://depfu.com/github/Neovici/computing-lit-element?project_id=9625)\n\n# \\\u003ccomputing-lit-element\u003e\n##### Adds computed properties functionality to LitElement.\u003cp\u003e\nThis webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.\n\n## Installation\n```bash\nnpm i computing-lit-element\n```\n\n## Usage\n```html\n\u003cscript type=\"module\"\u003e\n  import ComputingLitElement from 'computing-lit-element';\n  \n  class MyElement extends ComputingLitElement {\n  \tstatic get properties() {\n    \treturn {\n        \tproperty1: {\n            \ttype: Number\n            },\n           \tproperty2: {\n            \ttype: Number\n            },\n            computedProperty: {\n            \ttype: Number,\n                computed: 'computeComputedProperty(property1, property2)'\n            }\n       \t};\n    }\n    constructor() {\n    \tsuper();\n        this.property1 = 10;\n        this.property2 = 5;\n    }\n    computeComputedProperty(property1, property2) {\n    \treturn property1 * property2;\n    }\n  }\n\u003c/script\u003e\n```\n##### Or use the mixin\n```\n\u003cscript type=\"module\"\u003e\n  import computingMixin from 'computing-lit-element';\n  import { LitElement } from 'lit-element';\n  \n  const ComputingLitElement = computingMixin(LitElement);\n  ...\n```\n\n## Testing using karma (if applied by author)\n```bash\nnpm run test\n```\n\n## Testing using karma via browserstack (if applied by author)\n```bash\nnpm run test:bs\n```\n\n## Linting (if applied by author)\n```bash\nnpm run lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneovici%2Fcomputing-lit-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneovici%2Fcomputing-lit-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneovici%2Fcomputing-lit-element/lists"}