{"id":24327809,"url":"https://github.com/solidity-utilities/library-mapping-string","last_synced_at":"2026-04-21T15:02:47.658Z","repository":{"id":38108445,"uuid":"422309810","full_name":"solidity-utilities/library-mapping-string","owner":"solidity-utilities","description":"Solidity library for mapping of string key/value pairs","archived":false,"fork":false,"pushed_at":"2023-07-03T07:52:30.000Z","size":982,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T22:15:36.790Z","etag":null,"topics":["ethereum","library","mapping","solidity","string","truffle"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solidity-utilities.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":"2021-10-28T18:12:23.000Z","updated_at":"2021-12-05T02:39:32.000Z","dependencies_parsed_at":"2023-02-18T04:15:37.387Z","dependency_job_id":null,"html_url":"https://github.com/solidity-utilities/library-mapping-string","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidity-utilities%2Flibrary-mapping-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidity-utilities%2Flibrary-mapping-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidity-utilities%2Flibrary-mapping-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidity-utilities%2Flibrary-mapping-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidity-utilities","download_url":"https://codeload.github.com/solidity-utilities/library-mapping-string/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242990366,"owners_count":20217975,"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":["ethereum","library","mapping","solidity","string","truffle"],"created_at":"2025-01-17T22:15:42.715Z","updated_at":"2026-04-21T15:02:47.623Z","avatar_url":"https://github.com/solidity-utilities.png","language":"Solidity","funding_links":["https://liberapay.com/solidity-utilities"],"categories":[],"sub_categories":[],"readme":"# Library Mapping String\n[heading__top]:\n  #library-mapping-string\n  \"\u0026#x2B06; Solidity library for mapping of string key/value pairs\"\n\n\nSolidity library for mapping of string key/value pairs\n\n\n## [![Byte size of Library Mapping String][badge__main__library_mapping_string__source_code]][library_mapping_string__main__source_code] [![Open Issues][badge__issues__library_mapping_string]][issues__library_mapping_string] [![Open Pull Requests][badge__pull_requests__library_mapping_string]][pull_requests__library_mapping_string] [![Latest commits][badge__commits__library_mapping_string__main]][commits__library_mapping_string__main] [![Build Status][badge__github_actions]][activity_log__github_actions]\n\n\n---\n\n\n- [:arrow_up: Top of Document][heading__top]\n\n- [:building_construction: Requirements][heading__requirements]\n\n- [:zap: Quick Start][heading__quick_start]\n\n- [\u0026#x1F9F0; Usage][heading__usage]\n\n- [\u0026#x1F523; API][heading__api]\n  - [Library `LibraryMappingString`][heading__library_librarymappingstring]\n    - [Method `get`][heading__method_get]\n    - [Method `getOrElse`][heading__method_getorelse]\n    - [Method `getOrError`][heading__method_getorerror]\n    - [Method `has`][heading__method_has]\n    - [Method `overwrite`][heading__method_overwrite]\n    - [Method `overwriteOrError`][heading__method_overwriteorerror]\n    - [Method `remove`][heading__method_remove]\n    - [Method `removeOrError`][heading__method_removeorerror]\n    - [Method `set`][heading__method_set]\n    - [Method `setOrError`][heading__method_setorerror]\n\n- [\u0026#x1F5D2; Notes][heading__notes]\n\n- [:chart_with_upwards_trend: Contributing][heading__contributing]\n  - [:trident: Forking][heading__forking]\n  - [:currency_exchange: Sponsor][heading__sponsor]\n\n- [:card_index: Attribution][heading__attribution]\n\n- [:balance_scale: Licensing][heading__license]\n\n\n---\n\n\n\n## Requirements\n[heading__requirements]:\n  #requirements\n  \"\u0026#x1F3D7; Prerequisites and/or dependencies that this project needs to function properly\"\n\n\n\u003e Prerequisites and/or dependencies that this project needs to function properly\n\n\nThis project utilizes Truffle for organization of source code and tests, thus\nit is recommended to install Truffle _globally_ to your current user account\n\n\n```Bash\nnpm install -g truffle\n```\n\n\n______\n\n\n## Quick Start\n[heading__quick_start]:\n  #quick-start\n  \"\u0026#9889; Perhaps as easy as one, 2.0,...\"\n\n\n\u003e Perhaps as easy as one, 2.0,...\n\n\nNPM and Truffle are recommended for importing and managing project dependencies\n\n\n```Bash\ncd your_project\n\nnpm install @solidity-utilities/library-mapping-string\n```\n\n\n\u003e Note, source code for this library will be located within the\n\u003e `node_modules/@solidity-utilities/library-mapping-string` directory of\n\u003e _`your_project`_ root\n\n\nSolidity contracts may then import code via similar syntax as shown\n\n\n```Solidity\nimport {\n    LibraryMappingString\n} from \"@solidity-utilities/library-mapping-string/contracts/LibraryMappingString.sol\";\n```\n\n\n\u003e Note, above path is **not** relative (ie. there's no `./` preceding the file\n\u003e path) which causes Truffle to search the `node_modules` sub-directories\n\n\nReview the\n[Truffle -- Package Management via NPM][truffle__package_management_via_npm]\ndocumentation for more installation details.\n\n\n---\n\n\n\u003e In the future, after beta testers have reported bugs and feature requests, it\n\u003e should be possible to link the deployed `LibraryMappingString` via Truffle\n\u003e migration similar to the following.\n\u003e\n\u003e\n\u003e **`migrations/2_your_contract.js`**\n\u003e\n\u003e\n\u003e     const LibraryMappingString = artifacts.require(\"LibraryMappingString\");\n\u003e     const YourContract = artifacts.require(\"YourContract\");\n\u003e\n\u003e     module.exports = (deployer, _network, _accounts) {\n\u003e       LibraryMappingString.address = \"...\";\n\u003e       deployer.deploy(LibraryMappingString, { overwrite: false });\n\u003e       deployer.link(LibraryMappingString, YourContract);\n\u003e       deployer.deploy(YourContract);\n\u003e     };\n\n\n______\n\n\n## Usage\n[heading__usage]:\n  #usage\n  \"\u0026#x1F9F0; How to utilize this repository\"\n\n\n\u003e How to utilize this repository\n\n\nWrite contract(s) that make use of, and extend, `LibraryMappingString` features.\n\n\n```Solidity\n// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.8.7;\n\nimport {\n    LibraryMappingString\n} from \"@solidity-utilities/library-mapping-string/contracts/LibraryMappingString.sol\";\n\n/// @title Programming interface for storing string mapping data\n/// @author S0AndS0\ncontract StringStorage {\n    using LibraryMappingString for mapping(string =\u003e string);\n    mapping(string =\u003e string) data;\n    mapping(string =\u003e uint256) indexes;\n    string[] public keys;\n    address public owner;\n\n    constructor(address _owner) {\n        owner = _owner;\n    }\n\n    /// @notice Requires message sender to be an instance owner\n    /// @param _caller {string} Function name that implements this modifier\n    modifier onlyOwner(string memory _caller) {\n        string memory _message = string(\n            abi.encodePacked(\n                \"StringStorage.\",\n                _caller,\n                \": message sender not an owner\"\n            )\n        );\n        require(msg.sender == owner, _message);\n        _;\n    }\n\n    /// @notice Retrieves stored value `string` or throws an error if _undefined_\n    /// @dev Passes `_key` to `data.getOrError` with default Error `_reason` to throw\n    /// @param _key **{string}** Key mapped to value\n    /// @return **{string}** Value for corresponding `_key`\n    /// @custom:throws **{Error}** `\"StringStorage.get: value not defined\"`\n    function get(string calldata _key) external view returns (string memory) {\n        return data.getOrError(_key, \"StringStorage.get: value not defined\");\n    }\n\n    /// @notice Check if `string` key has a corresponding value `string` defined\n    /// @dev Forwards parameter to `data.has`\n    /// @return **{bool}**\n    function has(string calldata _key) external view returns (bool) {\n        return data.has(_key);\n    }\n\n    /// @notice Allow full read access to all `keys` stored within `data`\n    /// @dev **Warning** Key order is not guarantied\n    /// @return **{string[]}**\n    function listKeys() external view returns (string[] memory) {\n        return keys;\n    }\n\n    /// @notice Delete value `string` for given `_key`\n    /// @dev **Warning** Overwrites current key with last key\n    /// @dev Passes parameters to `data.removeOrError` with default Error `_reason` to throw\n    /// @return **{string}**\n    /// @custom:javascript Returns transaction object\n    /// @custom:throws **{Error}** `\"StringStorage.remove: message sender not an owner\"`\n    /// @custom:throws **{Error}** `\"StringStorage.remove: value not defined\"`\n    /// :bookmark: Track test fixes and dependency upgrades\n    function remove(string calldata _key)\n        external\n        onlyOwner(\"remove\")\n        returns (string memory)\n    {\n        string memory _value = data.removeOrError(\n            _key,\n            \"StringStorage.remove: value not defined\"\n        );\n        uint256 _last_index = keys.length - 1;\n        string memory _last_key = keys[_last_index];\n        if (keys.length \u003e 1) {\n            uint256 _target_index = indexes[_key];\n            keys[_target_index] = keys[_last_index];\n            indexes[_last_key] = _target_index;\n        }\n        delete indexes[_last_key];\n        keys.pop();\n        return _value;\n    }\n\n    /// @notice Call `selfdestruct` with provided address\n    /// @param _to **{address}** Where to transfer any funds this contract has\n    /// @custom:throws **{Error}** `\"StringStorage.selfDestruct: message sender not an owner\"`\n    function selfDestruct(address payable _to)\n        external\n        onlyOwner(\"selfDestruct\")\n    {\n        selfdestruct(_to);\n    }\n\n    /// @notice Store `_value` under given `_key` while preventing unintentional overwrites\n    /// @param _key **{string}** Mapping key to set corresponding value `string` for\n    /// @param _value **{string}** Mapping value to set\n    /// @custom:throws **{Error}** `\"StringStorage.set: message sender not an owner\"`\n    /// @custom:throws **{Error}** `\"StringStorage.set: value already defined\"`\n    function set(string calldata _key, string calldata _value)\n        external\n        onlyOwner(\"set\")\n    {\n        data.setOrError(\n            _key,\n            _value,\n            \"StringStorage.set: value already defined\"\n        );\n        keys.push(_key);\n    }\n\n    /// @notice Number of key/value `address` pairs stored\n    /// @dev Cannot depend on results being valid if mutation is allowed between calls\n    /// @return **{uint256}** Length of `keys` array\n    /// @custom:javascript Returns `BN` data object\n    function size() external view returns (uint256) {\n        return keys.length;\n    }\n}\n```\n\n\nAbove the `StringStorage` contract;\n\n\n- maintains a list of keys\n\n- restricts mutation to owner only\n\n\nThere is likely much that can be accomplished by leveraging these abstractions,\ncheck the [API][heading__api] section for full set of features available.  And\nreview the\n[`test/test__examples__StringStorage.js`][source__test__test__examples__stringstorage_js]\nfile for inspiration on how to use this library within projects.\n\n\n______\n\n\n## API\n[heading__api]:\n  #api\n  \"Application Programming Interfaces for Solidity smart contracts\"\n\n\n\u003e Application Programming Interfaces for Solidity smart contracts\n\n\n**Developer note** -\u003e Check the [`test/`][source__test] directory for\nJavaScript and Solidity usage examples\n\n\n---\n\n\n### Library `LibraryMappingString`\n[heading__library_librarymappingstring]:\n  #library-librarymappingstring\n  \"Organizes methods that may be attached to `mapping(string =\u003e string)` type\"\n\n\n\u003e Organizes methods that may be attached to `mapping(string =\u003e string)` type\n\n\n**Warning** any value of `\"\"` is treated as _null_ or _undefined_\n\n\n**Source** [`contracts/LibraryMappingString.sol`][source__contracts__librarymappingstring_sol]\n\n\n---\n\n\n#### Method `get`\n[heading__method_get]:\n  #method-get\n  \"Retrieves stored value `string` or throws an error if _undefined_\"\n\n\n\u003e Retrieves stored value `string` or throws an error if _undefined_\n\n\n[**Source**][source__contracts__librarymappingstring_sol__get] `get(mapping(string =\u003e string) _self, string _key)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key `string` to lookup corresponding value `string` for\n\n\n**Returns** -\u003e **{string}** Value for given key `string`\n\n\n**Throws** -\u003e **{Error}** `\"LibraryMappingString.get: value not defined\"`\n\n\n**Developer note** -\u003e Passes parameters to `getOrError` with default Error\n`_reason` to throw\n\n\n---\n\n\n#### Method `getOrElse`\n[heading__method_getorelse]:\n  #method-getorelse\n  \"Retrieves stored value `string` or provided default `string` if _undefined_\"\n\n\n\u003e Retrieves stored value `string` or provided default `string` if _undefined_\n\n\n[**Source**][source__contracts__librarymappingstring_sol__getorelse] `getOrElse(mapping(string =\u003e string) _self, string _key, string _default)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key `string` to lookup corresponding value `string` for\n\n- `_default` **{string}** Value to return if key `string` lookup is _undefined_\n\n\n**Returns** -\u003e **{string}** Value `string` for given key `string` or `_default` if _undefined_\n\n\n---\n\n\n#### Method `getOrError`\n[heading__method_getorerror]:\n  #method-getorerror\n  \"Allows for defining custom error reason if value `string` is _undefined_\"\n\n\n\u003e Allows for defining custom error reason if value `string` is _undefined_\n\n\n[**Source**][source__contracts__librarymappingstring_sol__getorerror] `getOrError(mapping(string =\u003e string) _self, string _key, string _reason)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key `string` to lookup corresponding value `string` for\n\n- `_reason` **{string}** Custom error message to throw if value `string` is _undefined_\n\n\n**Returns** -\u003e **{string}** Value for given key `string`\n\n\n**Throws** -\u003e **{Error}** `_reason` if value is _undefined_\n\n\n---\n\n\n#### Method `has`\n[heading__method_has]:\n  #method-has\n  \"Check if `string` key has a corresponding value `string` defined\"\n\n\n\u003e Check if `string` key has a corresponding value `string` defined\n\n\n[**Source**][source__contracts__librarymappingstring_sol__has] `has(mapping(string =\u003e string) _self, string _key)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key to check if value `string` is defined\n\n\n**Returns** -\u003e **{bool}** `true` if value `string` is defined, or `false` if _undefined_\n\n\n---\n\n\n#### Method `overwrite`\n[heading__method_overwrite]:\n  #method-overwrite\n  \"Store `_value` under given `_key` **without** preventing unintentional overwrites\"\n\n\n\u003e Store `_value` under given `_key` **without** preventing unintentional overwrites\n\n\n[**Source**][source__contracts__librarymappingstring_sol__overwrite] `overwrite(mapping(string =\u003e string) _self, string _key, string _value)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key to set corresponding value `string` for\n\n- `_value` **{string}** Mapping value to set\n\n\n**Throws** -\u003e  **{Error}** `\"LibraryMappingString.overwrite: value cannot be \"\"\"`\n\n\n**Developer note** -\u003e Passes parameters to `overwriteOrError` with default\nError `_reason` to throw\n\n\n---\n\n\n#### Method `overwriteOrError`\n[heading__method_overwriteorerror]:\n  #method-overwriteorerror\n  \"Store `_value` under given `_key` **without** preventing unintentional overwrites\"\n\n\n\u003e Store `_value` under given `_key` **without** preventing unintentional overwrites\n\n\n[**Source**][source__contracts__librarymappingstring_sol__overwriteorerror] `overwriteOrError(mapping(string =\u003e string) _self, string _key, string _value, string _reason)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key to set corresponding value `string` for\n\n- `_value` **{string}** Mapping value to set\n\n- `_reason` **{string}** Custom error message to present if value `string` is `\"\"`\n\n\n**Throws** -\u003e **{Error}** `_reason` if value is `\"\"`\n\n\n---\n\n\n#### Method `remove`\n[heading__method_remove]:\n  #method-remove\n  \"Delete value `string` for given `_key`\"\n\n\n\u003e Delete value `string` for given `_key`\n\n\n[**Source**][source__contracts__librarymappingstring_sol__remove] `remove(mapping(string =\u003e string) _self, string _key)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key to delete corresponding value `string` for\n\n\n**Returns** -\u003e **{string}** Value for given key `string`\n\n\n**Throws** -\u003e **{Error}** `\"LibraryMappingString.remove: value not defined\"`\n\n\n**Developer note** -\u003e Passes parameters to `removeOrError` with default Error\n`_reason` to throw\n\n\n---\n\n\n#### Method `removeOrError`\n[heading__method_removeorerror]:\n  #method-removeorerror\n  \"Delete value `string` for given `_key`\"\n\n\n\u003e Delete value `string` for given `_key`\n\n\n[**Source**][source__contracts__librarymappingstring_sol__removeorerror] `removeOrError(mapping(string =\u003e string) _self, string _key, string _reason)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key to delete corresponding value `string` for\n\n- `_reason` **{string}** Custom error message to throw if value `string` is _undefined_\n\n\n**Returns** -\u003e {string} Stored value `string` for given key `string`\n\n\n**Throws** -\u003e **{Error}** `_reason` if value is _undefined_\n\n\n---\n\n\n#### Method `set`\n[heading__method_set]:\n  #method-set\n  \"Store `_value` under given `_key` while preventing unintentional overwrites\"\n\n\n\u003e Store `_value` under given `_key` while preventing unintentional overwrites\n\n\n[**Source**][source__contracts__librarymappingstring_sol__set] `set(mapping(string =\u003e string) _self, string _key, string _value)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key to set corresponding value `string` for\n\n- `_value` **{string}** Mapping value to set\n\n\n**Throws**\n\n\n- **{Error}** `\"LibraryMappingString.set: value already defined\"`\n\n- **{Error}** `\"LibraryMappingString.setOrError: value cannot be \"\"\"`\n\n\n**Developer note** -\u003e Passes parameters to `setOrError` with default Error\n`_reason` to throw\n\n\n---\n\n\n#### Method `setOrError`\n[heading__method_setorerror]:\n  #method-setorerror\n  \"Store `_value` under given `_key` while preventing unintentional overwrites\"\n\n\n\u003e Stores `_value` under given `_key` while preventing unintentional overwrites\n\n\n[**Source**][source__contracts__librarymappingstring_sol__setorerror] `setOrError(mapping(string =\u003e string) _self, string _key, string _value, string _reason)`\n\n\n**Parameters**\n\n\n- `_self` **{mapping(string =\u003e string)}** Mapping of key/value `string` pairs\n\n- `_key` **{string}** Mapping key to set corresponding value `string` for\n\n- `_value` **{string}** Mapping value to set\n\n- `_reason` **{string}** Custom error message to present if value `string` is defined\n\n\n**Throws**\n\n\n- **{Error}**  `_reason` if value is defined\n\n- **{Error}** `\"LibraryMappingString.setOrError: value cannot be \"\"\"`\n\n\n______\n\n\n## Notes\n[heading__notes]:\n  #notes\n  \"\u0026#x1F5D2; Additional things to keep in mind when developing\"\n\n\n\u003e Additional things to keep in mind when developing\n\n\nImplementing\n[`selfdestruct`](https://docs.soliditylang.org/en/v0.4.21/units-and-global-variables.html?highlight=selfdestruct#contract-related)\non contracts that utilize this library is recommended. Because as explained by\n[Ethereum Storage](https://ethereum.org/en/developers/docs/storage/),\nit is **not** a good idea to store much data, especially dynamically sized\ntypes such as strings, on the Ethereum blockchain.\n\n\nInstead it be better to store large amounts of data, such as files, via\nservices such as;\n\n\n- [0 Chain][0_chain]\n\n- [Arweave][arweave]\n\n- [Swarm][swarm]\n\n- [File Coin][file_coin]\n\n- [STORJ][storj]\n\n- [Safe Network][safe_network]\n\n- [SkyNet][skynet]\n\n\n... and then use this library for tracking references to such assets.\n\n\nAdditionally it is a **very bad idea** to store any data that may be considered\nprivate, even if encrypted, within contracts.\n\n\n---\n\n\nThis repository may not be feature complete and/or fully functional, Pull Requests that add features or fix bugs are certainly welcomed.\n\n\n______\n\n\n## Contributing\n[heading__contributing]:\n  #contributing\n  \"\u0026#x1F4C8; Options for contributing to library-mapping-string and solidity-utilities\"\n\n\n\u003e Options for contributing to library-mapping-string and solidity-utilities\n\n\n---\n\n\n### Forking\n[heading__forking]:\n  #forking\n  \"\u0026#x1F531; Tips for forking library-mapping-string\"\n\n\nStart making a [Fork][library_mapping_string__fork_it] of this repository to an account that you have write permissions for.\n\n\n- Add remote for fork URL. The URL syntax is _`git@github.com:\u003cNAME\u003e/\u003cREPO\u003e.git`_...\n\n\n```Bash\ncd ~/git/hub/solidity-utilities/library-mapping-string\n\ngit remote add fork git@github.com:\u003cNAME\u003e/library-mapping-string.git\n```\n\n\n- Commit your changes and push to your fork, eg. to fix an issue...\n\n\n```Bash\ncd ~/git/hub/solidity-utilities/library-mapping-string\n\n\ngit commit -F- \u003c\u003c'EOF'\n:bug: Fixes #42 Issue\n\n\n**Edits**\n\n\n- `\u003cSCRIPT-NAME\u003e` script, fixes some bug reported in issue\nEOF\n\n\ngit push fork main\n```\n\n\n\u003e Note, the `-u` option may be used to set `fork` as the default remote, eg. _`git push -u fork main`_ however, this will also default the `fork` remote for pulling from too! Meaning that pulling updates from `origin` must be done explicitly, eg. _`git pull origin main`_\n\n\n- Then on GitHub submit a Pull Request through the Web-UI, the URL syntax is _`https://github.com/\u003cNAME\u003e/\u003cREPO\u003e/pull/new/\u003cBRANCH\u003e`_\n\n\n\u003e Note; to decrease the chances of your Pull Request needing modifications before being accepted, please check the [dot-github](https://github.com/solidity-utilities/.github) repository for detailed contributing guidelines.\n\n\n---\n\n\n### Sponsor\n  [heading__sponsor]:\n  #sponsor\n  \"\u0026#x1F4B1; Methods for financially supporting solidity-utilities that maintains library-mapping-string\"\n\n\nThanks for even considering it!\n\n\nVia Liberapay you may \u003csub\u003e[![sponsor__shields_io__liberapay]][sponsor__link__liberapay]\u003c/sub\u003e on a repeating basis.\n\n\nRegardless of if you're able to financially support projects such as library-mapping-string that solidity-utilities maintains, please consider sharing projects that are useful with others, because one of the goals of maintaining Open Source repositories is to provide value to the community.\n\n\n______\n\n\n## Attribution\n[heading__attribution]:\n  #attribution\n  \"\u0026#x1F4C7; Resources that where helpful in building this project so far.\"\n\n\n- [GitHub -- `github-utilities/make-readme`](https://github.com/github-utilities/make-readme)\n\n\n______\n\n\n## License\n[heading__license]:\n  #license\n  \"\u0026#x2696; Legal side of Open Source\"\n\n\n```\nSolidity library for mapping of string key/value pairs\nCopyright (C) 2021 S0AndS0\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published\nby the Free Software Foundation, version 3 of the License.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n\n\nFor further details review full length version of [AGPL-3.0][branch__current__license] License.\n\n\n\n[branch__current__license]:\n  /LICENSE\n  \"\u0026#x2696; Full length version of AGPL-3.0 License\"\n\n\n[badge__commits__library_mapping_string__main]:\n  https://img.shields.io/github/last-commit/solidity-utilities/library-mapping-string/main.svg\n\n[commits__library_mapping_string__main]:\n  https://github.com/solidity-utilities/library-mapping-string/commits/main\n  \"\u0026#x1F4DD; History of changes on this branch\"\n\n\n[library_mapping_string__community]:\n  https://github.com/solidity-utilities/library-mapping-string/community\n  \"\u0026#x1F331; Dedicated to functioning code\"\n\n\n[issues__library_mapping_string]:\n  https://github.com/solidity-utilities/library-mapping-string/issues\n  \"\u0026#x2622; Search for and _bump_ existing issues or open new issues for project maintainer to address.\"\n\n[library_mapping_string__fork_it]:\n  https://github.com/solidity-utilities/library-mapping-string/fork\n  \"\u0026#x1F531; Fork it!\"\n\n[pull_requests__library_mapping_string]:\n  https://github.com/solidity-utilities/library-mapping-string/pulls\n  \"\u0026#x1F3D7; Pull Request friendly, though please check the Community guidelines\"\n\n[library_mapping_string__main__source_code]:\n  https://github.com/solidity-utilities/library-mapping-string/\n  \"\u0026#x2328; Project source!\"\n\n[badge__issues__library_mapping_string]:\n  https://img.shields.io/github/issues/solidity-utilities/library-mapping-string.svg\n\n[badge__pull_requests__library_mapping_string]:\n  https://img.shields.io/github/issues-pr/solidity-utilities/library-mapping-string.svg\n\n[badge__main__library_mapping_string__source_code]:\n  https://img.shields.io/github/repo-size/solidity-utilities/library-mapping-string\n\n\n[0_chain]: https://0chain.net/\n\n[arweave]: https://www.arweave.org/\n\n[file_coin]: https://filecoin.io/\n\n[safe_network]: https://safenetwork.tech/\n\n[storj]: https://storj.io/\n\n[swarm]: https://ethersphere.github.io/swarm-home/\n\n[skynet]: https://siasky.net/\n\n\n[sponsor__shields_io__liberapay]:\n  https://img.shields.io/static/v1?logo=liberapay\u0026label=Sponsor\u0026message=solidity-utilities\n\n[sponsor__link__liberapay]:\n  https://liberapay.com/solidity-utilities\n  \"\u0026#x1F4B1; Sponsor developments and projects that solidity-utilities maintains via Liberapay\"\n\n\n[badge__github_actions]:\n  https://github.com/solidity-utilities/library-mapping-string/actions/workflows/test.yaml/badge.svg?branch=main\n\n[activity_log__github_actions]:\n  https://github.com/solidity-utilities/library-mapping-string/deployments/activity_log\n\n\n[truffle__package_management_via_npm]:\n  https://www.trufflesuite.com/docs/truffle/getting-started/package-management-via-npm\n  \"Documentation on how to install, import, and interact with Solidity packages\"\n\n\n[source__test]:\n  test\n  \"CI/CD (Continuous Integration/Deployment) tests and examples\"\n\n[source__test__test__examples__stringstorage_js]:\n  test/test__examples__StringStorage.js\n  \"JavaScript code for testing test/examples/StringStorage.sol\"\n\n[source__contracts__librarymappingstring_sol]:\n  contracts/LibraryMappingString.sol\n  \"Solidity code for LibraryMappingString\"\n\n[source__contracts__librarymappingstring_sol__get]:\n  contracts/LibraryMappingString.sol#L8\n  \"Solidity code for LibraryMappingString.get function\"\n\n[source__contracts__librarymappingstring_sol__getorelse]:\n  contracts/LibraryMappingString.sol#L27\n  \"Solidity code for LibraryMappingString.getOrElse function\"\n\n[source__contracts__librarymappingstring_sol__getorerror]:\n  contracts/LibraryMappingString.sol#L44\n  \"Solidity code for LibraryMappingString.getOrError function\"\n\n[source__contracts__librarymappingstring_sol__has]:\n  contracts/LibraryMappingString.sol#L60\n  \"Solidity code for LibraryMappingString.has function\"\n\n[source__contracts__librarymappingstring_sol__overwrite]:\n  contracts/LibraryMappingString.sol#L72\n  \"Solidity code for LibraryMappingString.overwrite function\"\n\n[source__contracts__librarymappingstring_sol__overwriteorerror]:\n  contracts/LibraryMappingString.sol#L91\n  \"Solidity code for LibraryMappingString.overwriteOrError function\"\n\n[source__contracts__librarymappingstring_sol__remove]:\n  contracts/LibraryMappingString.sol#L107\n  \"Solidity code for LibraryMappingString.remove function\"\n\n[source__contracts__librarymappingstring_sol__removeorerror]:\n  contracts/LibraryMappingString.sol#L125\n  \"Solidity code for LibraryMappingString.removeOrError function\"\n\n[source__contracts__librarymappingstring_sol__set]:\n  contracts/LibraryMappingString.sol#L142\n  \"Solidity code for LibraryMappingString.set function\"\n\n[source__contracts__librarymappingstring_sol__setorerror]:\n  contracts/LibraryMappingString.sol#L162\n  \"Solidity code for LibraryMappingString.setOrError function\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidity-utilities%2Flibrary-mapping-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidity-utilities%2Flibrary-mapping-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidity-utilities%2Flibrary-mapping-string/lists"}