utils.wxs 286B

12345678910111213
  1. var bem = require('./bem.wxs').bem;
  2. var memoize = require('./memoize.wxs').memoize;
  3. function isSrc(url) {
  4. return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0;
  5. }
  6. module.exports = {
  7. bem: memoize(bem),
  8. isSrc: isSrc,
  9. memoize: memoize
  10. };