{"id":18825385,"url":"https://github.com/outsystems/immutable-records","last_synced_at":"2025-04-14T01:31:25.167Z","repository":{"id":57157730,"uuid":"51023962","full_name":"OutSystems/immutable-records","owner":"OutSystems","description":"A simple implementation of immutable records.","archived":false,"fork":false,"pushed_at":"2016-02-23T21:30:17.000Z","size":7,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-27T15:49:16.509Z","etag":null,"topics":["engineering","snyk-product"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OutSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-02-03T19:18:30.000Z","updated_at":"2022-06-14T14:19:31.000Z","dependencies_parsed_at":"2022-08-24T12:00:31.965Z","dependency_job_id":null,"html_url":"https://github.com/OutSystems/immutable-records","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2Fimmutable-records","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2Fimmutable-records/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2Fimmutable-records/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2Fimmutable-records/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OutSystems","download_url":"https://codeload.github.com/OutSystems/immutable-records/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248807567,"owners_count":21164709,"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":["engineering","snyk-product"],"created_at":"2024-11-08T00:59:17.175Z","updated_at":"2025-04-14T01:31:24.858Z","avatar_url":"https://github.com/OutSystems.png","language":"JavaScript","readme":"# immutable-records\n[![npm version](https://badge.fury.io/js/immutable-records.svg)](https://badge.fury.io/js/immutable-records)\nA simple implementation of immutable records for JavaScript.\n\nThe goal of this implementation is to have great performance dealing with\nrecords with a small, fixed set of attributes. [See here](https://medium.com/outsystems-engineering/javascript-and-immutability-how-fast-is-fast-enough-27790cda4e9e#.4xf0eiq4m) for a performance comparision with Facebook's [immutable-js](https://facebook.github.io/immutable-js/).\n\nThis is the JavaScript version of the [TypeScript](https://github.com/OutSystems/immutable-records) version for use with npm.\n\n### Install (via NPM)\n\n```shell\n$ npm install immutable-records\n```\n\n### Usage\n```javascript\nvar Record = require('immutable-records').Record;\n\nvar ABRecord = Record({a:1, b:2});\nvar myRecord = new ABRecord({b:3});\n\nmyRecord.get('b'); // 3\n\nmyRecord = myRecord.set('a', 4); // Returns a new Record\nmyRecord.get('a'); // 4\n\nmyRecord.toJS(); // Returns a vanilla JS Object { a: 4, b: 3 }\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fimmutable-records","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutsystems%2Fimmutable-records","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fimmutable-records/lists"}