Package Exports
- soql-escape
- soql-escape/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (soql-escape) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
soql-escape
Escape soql queries
Installation
npm i soql-escapeor with yarn
yarn add soql-escapeUsage
const { soql } = require('soql-escape')Query with characters to escape:
soql`SELECT foo FROM Bar WHERE str = ${unEscapedString}`Query using a date:
soql`
SELECT id, CreatedDate
FROM Sales_Order__c
WHERE CreatedDate < ${new Date('2013-05-21T00:00:00Z')}
`It is also possible to import the escape function directly:
const { escape } = require('soql-escape')
assert(escape('"quotes\'') === `'\\"quotes\\''`)Contributing
Fork this repo and create a pull-request.