Skip to content

Instantly share code, notes, and snippets.

@szanata
Created August 19, 2018 21:13
Show Gist options
  • Save szanata/c51a1fea0bf44e674782bc7584da8a15 to your computer and use it in GitHub Desktop.
Save szanata/c51a1fea0bf44e674782bc7584da8a15 to your computer and use it in GitHub Desktop.
Syntax options
// Option one
// All setters
XYZ.title = 'My cool test';
XYZ.before = () => {
};
XYZ.do = () => {
};
XYZ.after = () => {
};
// Option two
// All functions
XYZ.title('My cool test');
XYZ.before(() => {
});
XYZ.do(() => {
});
XYZ.after(() => {
});
// Option 3
// One big function arguments
XYZ.test('My cool test', {
before() {
},
do() {
},
after() {
}
});
// Option four
// Annotation look-a-like
// @title
'My cool test';
// @before
() => {
}
// @do
() => {
}
// @after
() => {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment