@annoto/ims-lti
Version:
Module for building an LTI Tool Provider and accept LTI launch requests
16 lines (15 loc) • 497 B
JavaScript
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
// Special encode is our encoding method that implements
// the encoding of characters not defaulted by encodeURI
//
// Specifically ' and !
//
// Returns the encoded string
exports.special_encode = string =>
encodeURIComponent(string)
.replace(/[!'()]/g, escape)
.replace(/\*/g, '%2A');