fix naming

This commit is contained in:
Stefan Feješ
2017-12-17 15:41:31 +01:00
parent bebe9ec3c4
commit f559030eac
73 changed files with 18 additions and 18 deletions

9
snippets/get-type.md Normal file
View File

@ -0,0 +1,9 @@
### Get native type of value
Returns lower-cased constructor name of value, "undefined" or "null" if value is undefined or null
```js
const getType = v =>
v === undefined ? 'undefined' : v === null ? 'null' : v.constructor.name.toLowerCase();
// getType(new Set([1,2,3])) -> "set"
```