Utils for @untemps packages.
A complete documentation of utils is available here: Docs
yarn add @untemps/utils
Utils for @untemps packages
Home Page: https://utils.untemps.net
License: MIT License
Utils for @untemps packages.
A complete documentation of utils is available here: Docs
yarn add @untemps/utils
Get utils/getCSSDeclarationfrom https://github.com/untemps/svelte-use-drop-outside
In Jest context, getBoundingClientRect
always returns 0 for all values which is pretty annoying when trying to test DOM element interactions.
If passing size and position in the createElement
function, it may use these values to fill getBoundingClientRect
returned object up.
resolveClassName
accepts arrays as conditions only. In the case of a dynamic class names aggregation, it may be quite difficult to mix conditions and class names we want to set for sure : either we have to concatenate strings and resolveClassName
results or we have to fake truthy conditions.
It would be great to be able to mix arrays of condition and strings in the array-single attribute of the function like this:
const a = 0
const b = 3
resolveClassName(['foo', [a < b, 'bar', 'gag'], 'pol', [a > 0, 'zaz']]) // 'foo bar pol'
string/interpolate
function is buggy since if we pass 0
as token value it is parsed as nullish value and the token key is returned.
Instead of converting the token value as a boolean ( !!value
), we should check if it is not null or undefined.
That could be an idea to add a new lodash-like isNil
function to evaluate this condition.
Functions are exported as default which leads to resolution failure in cjs environments, such as Jest. Switch to named exports should fix that.
That will be a breaking change.
Rollup babel config sets babel-helpers = "bundled"
which prevents the app using the package from resolving the helpers at runtime. Changing this value to "runtime" in combination with @babel/plugin-transform-runtime
and @babel/runtime
should fix this issue.
Add jsdoc and comments to all utils and write README.
Add a function to retrieve a DOM element by its selector. A simple wrapper around the querySelector
method to standardize the utils API.
Package: dom
Function name: getElement
It would be useful to add a new function that extracts values from a source array by their indices.
Something like :
extract(source, indices)
Get utils/doElementsOverlap
from https://github.com/untemps/svelte-use-drop-outside
For now on, getRandomInteger
returns a float, not an integer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.