PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/website/source/php/var/is_null.html

https://github.com/andriuspetrauskis/phpjs
HTML | 42 lines | 41 code | 1 blank | 0 comment | 0 complexity | b0695e6150a9b86d4ef0ce8148f05e85 MD5 | raw file
  1. ---
  2. warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand'
  3. examples:
  4. - is_null('23')
  5. - is_null(null)
  6. estarget: es5
  7. returns:
  8. - 'false'
  9. - 'true'
  10. dependencies: []
  11. authors:
  12. original by:
  13. - 'Kevin van Zonneveld (http://kvz.io)'
  14. notes: []
  15. type: function
  16. layout: function
  17. title: PHP's is_null in JavaScript
  18. description: >-
  19. Heres what our current JavaScript equivalent to <a
  20. href="http://php.net/manual/en/function.is_null.php">PHP's is_null</a> looks
  21. like.
  22. function: is_null
  23. category: var
  24. language: php
  25. permalink: php/var/is_null/
  26. alias:
  27. - /functions/php/is_null/
  28. - /functions/var/is_null/
  29. - /php/is_null/
  30. - /functions/is_null/
  31. ---
  32. {% codeblock lang:javascript %}module.exports = function is_null (mixedVar) { // eslint-disable-line camelcase
  33. // discuss at: http://locutus.io/php/is_null/
  34. // original by: Kevin van Zonneveld (http://kvz.io)
  35. // example 1: is_null('23')
  36. // returns 1: false
  37. // example 2: is_null(null)
  38. // returns 2: true
  39. return (mixedVar === null)
  40. }
  41. {% endcodeblock %}