All Downloads are FREE. Search and download functionalities are using the official Maven repository.

polyfills.Array.of.meta.json Maven / Gradle / Ivy

The newest version!
{"aliases":["es6","modernizr:es6array","default-3.4","default-3.5","default-3.6","default"],"browsers":{"chrome":"<=44","firefox":"* - 24","ie":"<14","ie_mob":"10 - *","opera":"*","safari":"<9.1","firefox_mob":"<25","android":"*","ios_saf":"<9","samsung_mob":"<5"},"dependencies":["Object.defineProperty"],"spec":"http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of","install":{"module":"array.of","paths":["array-of.js"]},"license":"MIT","repo":"https://github.com/mathiasbynens/Array.of/","detectSource":"'of' in Array","testSource":"","baseDir":"Array/of","hasTests":true,"testsSource":"/* eslint-env mocha, browser*/\n/* global proclaim, it */\n\nit('has correct instance', function () {\n\tproclaim.isInstanceOf(Array.of, Function);\n});\n\nit('has correct name', function () {\n\tfunction nameOf(fn) {\n\t\treturn Function.prototype.toString.call(fn).match(/function\\s*([^\\s]*)\\(/)[1];\n\t}\n\tproclaim.equal(nameOf(Array.of), 'of');\n});\n\nit('has correct argument length', function () {\n\tproclaim.equal(Array.of.length, 0);\n});\n\ndescribe('returns an array with', function () {\n\tvar array, object;\n\n\tit('one string', function () {\n\t\tarray = Array.of('abc');\n\n\t\tproclaim.isInstanceOf(array, Array);\n\t\tproclaim.equal(array.length, 1);\n\t\tproclaim.equal(array[0], 'abc');\n\t});\n\n\tit('three strings', function () {\n\t\tarray = Array.of('a', 'b', 'c');\n\n\t\tproclaim.isInstanceOf(array, Array);\n\t\tproclaim.equal(array.length, 3);\n\t\tproclaim.equal(array[0], 'a');\n\t\tproclaim.equal(array[1], 'b');\n\t\tproclaim.equal(array[2], 'c');\n\t});\n\n\tit('one number', function () {\n\t\tarray = Array.of(123);\n\n\t\tproclaim.isInstanceOf(array, Array);\n\t\tproclaim.equal(array.length, 1);\n\t\tproclaim.equal(array[0], 123);\n\t});\n\n\tit('one object', function () {\n\t\tobject = {\n\t\t\t0: 'a',\n\t\t\t1: 'b',\n\t\t\t2: 'c',\n\t\t\tlength: 3\n\t\t};\n\t\tarray = Array.of(object);\n\n\t\tproclaim.isInstanceOf(array, Array);\n\t\tproclaim.equal(array.length, 1);\n\t\tproclaim.equal(array[0], object);\n\t});\n});"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy