Newer
Older
web-services / base-line-nodejs / index.js
@Nicolas Thouvenin Nicolas Thouvenin on 10 Mar 2022 336 bytes feat: add base line nodjs and python
var accents = require('remove-accents');

const dropAccent = (data, feed, ctx) => {
  if (ctx.isLast()) {
    return feed.close();
  }
  const defval = ctx.getParam('valeurParDefaut', 'n/a')
  const curval = data.value || defval;
  data.value = accents.remove(curval);
  return feed.send(data);
};

exports.default = {
  dropAccent,
};