insomnia/app/templating/extensions/timestamp-extension.js
Gregory Schier 79b3f3fe7c Better Nunjucks Tag Editor (#234)
* Helper to tokenize Nunjucks tag

* More granular types

* Add tag definitions

* Improve editor to be more WYSIWYG

* Fixed tests

* Added raw response tag
2017-05-23 15:05:31 -07:00

33 lines
482 B
JavaScript

import BaseExtension from './base/base-extension';
export default class TimestampExtension extends BaseExtension {
constructor () {
super();
this.deprecated = true;
}
getName () {
return 'Timestamp';
}
getDefaultFill () {
return 'timestamp';
}
getTag () {
return 'timestamp';
}
getDescription () {
return 'generate timestamp in milliseconds';
}
getArguments () {
return [];
}
run (context) {
return Date.now();
}
}