Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaid/ensure-object
If given value is not an object, returns an object with one entry.
https://github.com/jaid/ensure-object
convert ensure ensure-object lib library object util utility
Last synced: 3 days ago
JSON representation
If given value is not an object, returns an object with one entry.
- Host: GitHub
- URL: https://github.com/jaid/ensure-object
- Owner: Jaid
- License: mit
- Created: 2019-07-02T05:53:06.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T18:16:48.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T14:49:25.528Z (8 months ago)
- Topics: convert, ensure, ensure-object, lib, library, object, util, utility
- Language: JavaScript
- Homepage: https://github.com/Jaid/ensure-object
- Size: 2.03 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license.txt
Awesome Lists containing this project
README
# ensure-object
**If given value is not an object, returns an object with one entry.**
## Installation
```bash
npm install --save ensure-object@^1.0.1
```
```bash
yarn add ensure-object@^1.0.1
```
```html```
## Development
Setting up:
```bash
git clone [email protected]:jaid/ensure-object.git
cd ensure-object
npm install
```
Testing:
```bash
npm run test:dev
```
Testing in production environment:
```bash
npm run test
```## License
```text
MIT LicenseCopyright © 2020, Jaid (github.com/jaid)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```