Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/molnarmark/arraytypes
🏘 Get a beautiful string representation of types inside of an Array.
https://github.com/molnarmark/arraytypes
Last synced: about 1 month ago
JSON representation
🏘 Get a beautiful string representation of types inside of an Array.
- Host: GitHub
- URL: https://github.com/molnarmark/arraytypes
- Owner: molnarmark
- License: mit
- Created: 2018-08-19T02:31:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-19T02:56:51.000Z (over 6 years ago)
- Last Synced: 2024-10-10T23:34:08.989Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Array Types
> Get a beautiful string representation of types inside of an Array.
### Inspiration
To be completely fair, none. I needed a tiny, zero dependency package for a project that would do this, so I decided to create one.### Usage
```javascript
const ArrayTypes = require('get-array-types')console.log(ArrayTypes([1, 2, 3, 'Hello', 'World']).toString())
//=> Arrayconsole.log(ArrayTypes([1, 'Hello', 2, 'World']).elementTypes())
//=> ['number', 'string']
```### TODO
- Implement isOfSingleType()### License
- MITHappy Javascripting! 〰️