{"id":19574682,"url":"https://github.com/stringparser/mase","last_synced_at":"2026-05-07T02:32:25.950Z","repository":{"id":31071505,"uuid":"34630416","full_name":"stringparser/mase","owner":"stringparser","description":"in memory db for when things are simple","archived":false,"fork":false,"pushed_at":"2015-06-05T18:30:49.000Z","size":1764,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T01:36:02.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://stringparser.github.io/mase","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"VCVRack/community","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stringparser.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":"2015-04-26T20:39:54.000Z","updated_at":"2015-05-08T08:45:55.000Z","dependencies_parsed_at":"2022-08-30T22:31:10.613Z","dependency_job_id":null,"html_url":"https://github.com/stringparser/mase","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fmase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringparser","download_url":"https://codeload.github.com/stringparser/mase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240368119,"owners_count":19790374,"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-11T06:43:24.472Z","updated_at":"2026-05-07T02:32:25.895Z","avatar_url":"https://github.com/stringparser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## mase\n[![build][b-build]][x-travis][![NPM version][b-version]][p-mase] [![Gitter][b-gitter]][x-gitter]\n\nmongo-like memory db for when things are simple\n\n[install](#install) -\n[documentation][gh-pages] -\n[license](#license)\n\n## documentation\n\nThe documentation is a pleasant [gitbook][gh-pages].\n\n## usage\n\n```js\nvar Mase = require('mase');\n\nvar collection = [\n  {name: 'one'},\n  {name: 'two'}\n];\n\nvar db = new Mase('name', collection);\n\ndb.find({name: 'one'});\n// =\u003e\n[ { name: 'one', _id: 'wzy7rd33q8478pvi' } ]\n\ndb.find({name: 'o'}, function $test(fields, doc, key){\n  return RegExp(fields[key]).test(doc[key]);\n});\n// =\u003e\n[ { name: 'one', _id: 'wzy7rd33q8478pvi' },\n  { name: 'two', _id: 'ruffil4brshv9529' } ]\n\ndb.insert(1);\n// =\u003e\n{ value: 1, _id: 'vp61d8s6iyynwmi' }\n\ndb.insert({_id: 1, num: 1});\n// =\u003e\n{ _id: 1, num: 1 }\n\ndb.update({name: 'one'}, {key: 'val'}).find();\n// =\u003e\n[ { name: 'one', _id: 'wzy7rd33q8478pvi', key: 'val' },\n  { name: 'two', _id: 'ruffil4brshv9529' },\n  { value: 1, _id: 'vp61d8s6iyynwmi' },\n  { _id: 1, num: 1 } ]\n\ndb.remove(1);\n// =\u003e true\n\ndb.find();\n// =\u003e\n[ { name: 'one', _id: 'wzy7rd33q8478pvi', key: 'val' },\n  { name: 'two', _id: 'ruffil4brshv9529' },\n  { value: 1, _id: 'vp61d8s6iyynwmi' } ]\n\ndb.remove(2);\n// =\u003e false (we had no element with 2 for _id)\n\nvar fs = require('fs');\nfs.createWriteStream('collection.json')\n  .write(JSON.stringify(db.find()));\n```\n\n## install\n\nWith [npm][x-npm]\n\n```sh\nnpm install mase\n```\n\n## license\n\nThis software is released under the MIT license\n\nCopyright (c) 2015 Javier Carrillo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\u003c!-- links\n  b-: is for badges\n  p-: is for package\n  t-: is for doc's toc\n  x-: is for just a link\n--\u003e\n\n[x-npm]: https://www.npmjs.org\n[p-mase]: https://npmjs.com/mase\n\n[gh-pages]: https://stringparser.github.io/mase\n[x-gitter]: https://gitter.im/stringparser/mase\n[x-travis]: https://travis-ci.org/stringparser/mase/builds\n[x-license]: http://opensource.org/licenses/MIT\n[x-new-issue]: https://github.com/stringparser/mase/issues/new\n\n[b-build]: http://img.shields.io/travis/stringparser/mase/master.svg?style=flat-square\n[b-gitter]: https://badges.gitter.im/Join%20Chat.svg\n[b-version]: http://img.shields.io/npm/v/mase.svg?style=flat-square\n[b-license]: http://img.shields.io/npm/l/mase.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fmase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringparser%2Fmase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fmase/lists"}