Escape Salesforce SOQL queries and SOSL searches. Can be used standalone or in conjunction with JSForce.
> npm install --save-dev escape-soql-and-sosl
const {escapeSOQL, escapeSOSL} = require('escape-soql-and-sosl');
const jsforce = require('jsforce');
const conn = ...
const query = `FIND {@${escapeSOSL('pride-feat-dangelo.com')}} IN email FIELDS RETURNING Contact(Id, AccountId WHERE AccountId != null)`;
conn.search(query);
The MIT License.