Sha256: e6ce79a48dfcdaf0e1433dbb12f68d930c2ffa370a7c5ce0d6a49dddec7f43bc
Contents?: true
Size: 1.63 KB
Versions: 99
Compression:
Stored size: 1.63 KB
Contents
<!DOCTYPE html> <html> <head> <title>isArray Tests</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style> .fail { color: red; } .pass { color: green; } </style> </head> <body> <ul id="results"></ul> <script src="../build/build.js"></script> <script> var isArray = require('isArray'); var results = document.getElementById('results'); function assert(val, text) { results.innerHTML += '<li class="' + (val === true?'pass':'fail') + '">' + (val === true?'PASS':'FAIL') + ': ' + text + '</li>'; if (val !== true) window.testsPassed = false; } assert(isArray([]), '`[]` is an array.'); assert(isArray([1]), '`[1]` is an array.'); assert(isArray([1, 2, 3]), '`[1, 2, 3]` is an array.'); assert(!isArray(""), '`""` is not an array.'); assert(!isArray("foo"), '`"foo"` is not an array.'); assert(!isArray(5), '`5` is not an array.'); assert(!isArray(null), '`null` is not an array.'); assert(!isArray(undefined), '`undefined` is not an array.'); assert(!isArray(true), '`true` is not an array.'); assert(!isArray(false), '`false` is not an array.'); assert(!isArray({}), '`{}` is not an array.'); assert(!isArray({length: 1}), '`{length: 1}` is not an array.'); (function () { assert(!isArray(arguments), '`arguments` is not an array.'); }()); (function () { assert(!isArray(arguments), '`arguments` is not an array.'); }(1, 2, 3)); window.testsPassed = window.testsPassed != false; </script> </body> </html>
Version data entries
99 entries across 99 versions & 4 rubygems