MCPcopy Create free account
hub / github.com/ampproject/amphtml / pseudoArray

Function pseudoArray

extensions/amp-animation/0.1/test/test-css-expr-parser.js:96–109  ·  view source on GitHub ↗

* @param {!Array<!CssNode>} array * @param {?Array } dims * @param {string=} delim * @return {string}

(array, dims = null, delim = ', ')

Source from the content-addressed store, hash-verified

94 * @return {string}
95 */
96 function pseudoArray(array, dims = null, delim = ', ') {
97 if (!array || array.length == 0) {
98 return '';
99 }
100 return array
101 .map((n, i) => {
102 const v = pseudo(n);
103 if (dims && i < dims.length) {
104 return `${v}|${dims[i]}`;
105 }
106 return v;
107 })
108 .join(delim);
109 }
110
111 it('should parse empty string as null', () => {
112 expect(parsePseudo('')).to.be.null;

Callers 1

pseudoFunction · 0.85

Calls 1

pseudoFunction · 0.85

Tested by

no test coverage detected