Last 12 weeks · 1 commit
3 of 6 standards met
@ljharb brought this up in TC39 the other day... Ponyfills should absolutely be encouraged, I think there's plenty of benefits to using them. However, there's a valid use case of polyfills that gets ignored: When you have nested dependencies that have less backwards support than you do they won't use ponyfills/polyfills. Now you can't use that particular dependency without using a full polyfill unless you fork the dependency (which could also be several deps deep). 1. I think package authors should be encouraged to use ponyfills longer than everyone else 2. I think polyfills should be limitedly encouraged as the correct solution to that particular problem
Repository: sindresorhus/ponyfill. Description: 🦄 Like polyfill but with pony pureness Stars: 1270, Forks: 26. Topics: polyfill, ponies, ponyfill, unicorns. Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 57%. Top contributors: sindresorhus, Muhlex, lgarron, mathiasbynens, SamVerschueren.
I recently asked the interwebs (bsky post, Mastodon post): What would you call a piece of code that implements a proposed web standard, but not exactly? E.g. it may use… CSS custom properties instead of the proposed properties HTML custom elements instead of the proposed element names a regular CSS class instead of a proposed pseudo-class It's not a polyfill¹; polyfills implement an API exactly as it will be and can be removed it later without any further code changes. It's not a shim², because it doesn't intercept anything. Do we really not have a term for it? ¹ https://en.wikipedia.org/wiki/Polyfill_(programming) ² https://en.wikipedia.org/wiki/Shim_(computing) From the responses, "ponyfill" seemed the closest thing, but the current definition is too tightly scoped to JS. What do you think about expanding it?