How to use the linq.forEach function in linq

To help you get started, we’ve selected a few linq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dioptre / embercms / server / api / services / Email.js View on Github external
return new Promise(function (resolve, reject) {
	var email = new sendgrid.Email();
	email.addTo(options.to);
	email.subject = options.subject;
	email.from = options.from || sails.config.sendgrid.sender;
	if (typeof options.substitutions !== 'undefined' && options.substitutions) {
		Enumerable.forEach(substitions, function(val,i) {
			email.addSubstitution(val[0], val[1]);
		});
	}
	if (typeof options.template === 'string' && options.template.length > 0) {
		email.addFilter('templates', 'enable', 1);
		email.addFilter('templates', 'template_id', options.template);
	}
	else {
		email.text = ' ';
		if (typeof options.text === 'string' && options.text.length > 0)
			email.text = options.text;

		email.html = ' ';
		if (typeof options.html === 'string' && options.html.length > 0)
			email.html = options.html;
		else

linq

linq.js - LINQ for JavaScript

MIT
Latest version published 7 months ago

Package Health Score

64 / 100
Full package analysis

Popular linq functions