describe(`property 'names'`, () => { const cs = new helpers.ColumnSet([`name1`, `name2`]); const csEmpty = new helpers.ColumnSet([]); it(`must return the right string`, () => { expect(cs.names).toBe(`"name1","name2"`); expect(csEmpty.names).toBe(``); }); it(`must reuse the data`, () => { expect(cs.names).toBe(`"name1","name2"`); }); });
tape("allBuiltInRulesHaveValidUrl", (test) => { test.plan(132); rules.forEach(function forRule(rule) { test.ok(rule.information); test.ok(Object.getPrototypeOf(rule.information) === URL.prototype); const name = rule.names[0].toLowerCase(); test.equal( rule.information.href, `${homepage}/blob/v${version}/doc/Rules.md#${name}` ); }); test.end(); });
results.reduce( (m, r) => { m.names.push(r.name); m.ids.push(r.objectId); return m; }, { ids: [], names: [] } )
transpile(options = {}) { let code = this.transpileVars(options.names); code = `${code}while (${this.args[0].transpile()}) { ${this.args[1].transpile()} }`; return code; }
token.names .map((identifierName) => { if (typeof identifierName !== 'string') { throw new InvalidInputError('Identifier name array member type must be a string.'); } return escapeIdentifier(identifierName); }) .join('.')
rules.forEach((rule) => { const name = rule.names[0].toLowerCase(); rule.information = new URL(`${homepage}/blob/v${version}/doc/Rules.md#${name}`); });
transpile(options = {}) { let code = this.transpileVars(this, options.names); const cond = this.args[0]; const thencmd = this.args[1]; const elsecmd = this.args[2]; code = `${code}if (${cond.transpile(options)}) { ${thencmd.transpile( options )} }`; if (elsecmd) { code = `${code} else { ${elsecmd.transpile(options)} }`; } return code; }
transpile(options = {}) { if (!options.names) { options.names = {}; } let code = this.transpileVars(options.names); code = `${this.args[0].transpile()} ${ this.args[2] || '=' } ${this.args[1].transpile()};\n`; if (options.exports) { code = `${code}${this.transpileExports(options.names)}`; } return code; }
results.reduce((m, r) => { m.names.push(r.name); m.ids.push(r.objectId); return m; }, { ids: [], names: [] })
rules.forEach(function (rule) { var name = rule.names[0].toLowerCase(); rule.information = new URL(homepage + "/blob/v" + version + "/doc/Rules.md#" + name); });