added backup and email client

This commit is contained in:
2026-02-01 00:02:35 +01:00
parent ff857be01a
commit e4fdfbc95f
210 changed files with 24211 additions and 742 deletions
@@ -0,0 +1,25 @@
import { css } from 'goober';
import { shouldForwardProp } from '../index';
describe('shouldForwardProp', () => {
it('type', () => {
expect(typeof shouldForwardProp).toEqual('function');
});
it('shouldForwardProp', () => {
const fn = shouldForwardProp((prop) => {
// Filter out props prefixed with '$'
return prop[0] !== '$';
});
const props = {
color: 'red',
$shouldAnimate: true
};
// 'render'
fn(props);
expect(props).toEqual({ color: 'red' });
});
});
+19
View File
@@ -0,0 +1,19 @@
/**
* Should forward prop utility function
* @param {Function} filterPropFunction The flter function
*/
export function shouldForwardProp(filterPropFunction) {
/**
* The forward props function passed to `setup`
* @param {object} props
*/
function forwardProp(props) {
for (let p in props) {
if (!filterPropFunction(p)) {
delete props[p];
}
}
}
return forwardProp;
}