mceley / kotlin-extensions Goto Github PK
View Code? Open in Web Editor NEWA collection of convenience extensions used across multiple projects.
License: MIT License
A collection of convenience extensions used across multiple projects.
License: MIT License
For maps that use a string as the key, add an extension to filter by the key length. This is helpful in instances where keys are based on user input and need to be truncated or dropped.
Signature for this could be:
fun Map<String, *>.filterKeyLength(
length: Int,
truncate: Boolean = false
) = filterKeys {
// Method body
}
This should loosely mimic the java.util.Calendar.roll
method, but should act in a more naive manner. For instance, rolling forward one day should just add 1000 * 60 * 60 * 24
milliseconds to the current Date
object.
Possible signature:
fun Date.roll(
seconds: Int = 0,
hours: Int = 0,
days: Int = 0
)
Add a second version that returns a copy of the Date
instead of altering the calling object.
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.