https://github.com/serapath/x-is-ducktype-array
x is an array that contains only elements of given ducktype
https://github.com/serapath/x-is-ducktype-array
Last synced: 8 months ago
JSON representation
x is an array that contains only elements of given ducktype
- Host: GitHub
- URL: https://github.com/serapath/x-is-ducktype-array
- Owner: serapath
- License: mit
- Created: 2016-09-06T15:43:00.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-22T16:02:40.000Z (over 9 years ago)
- Last Synced: 2025-09-06T14:42:59.089Z (10 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/x-is-ducktype-array
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# x-is-ducktype-array
x is an array that contains only elements of given ducktype
# usage
`npm install x-is-ducktype-array`
```js
var xString = require('x-is-string')
var xDTypeArray = require('x-is-ducktype-array')
xDTypeArray(xString, []) // => true
xDTypeArray(xString, ['']) // => true
xDTypeArray(xString, ['', {}]) // => false
xDTypeArray(xString, {}) // => false
```
# related
a list of other `x-is-...` modules can be found at
* [x-is](https://www.npmjs.com/package/x-is)