As we have seen in many answers, PWM is a kind of adapter that provides API-level functionality that was not necessarily part of this API. There are many good and complete answers in this thread, so I will not expand the definition further.
However, I think I can add a good example that is Javascript ES5 Shim ( https://github.com/es-shims/es5-shim ):
Javascript has changed a lot over the last few years, and among many other changes to the language specification, many new methods have been added to its core objects.
For example, in the ES2015 specification (aka ES5), the find method was added to the Array prototype. Suppose you execute your code using the JavasScript engine before this specification (for example, Node 0.12), which this method does not yet offer. When you load the ES5 gasket, these new methods will be added to the Array prototype, which allows you to use them even if you are not using the newer JavaScript specification.
You may ask: why does someone do this instead of updating the environment to a newer version (say, Node 8)?
There are many real scenarios in which such an approach makes sense. One good example:
Suppose you have an outdated system that works in an old environment, and you need to use such new methods to implement / fix functionality. Updating your environment is still under development, as there are compatibility issues that require a lot of code changes and tests (a critical component).
In this example, you can try to create your own version of such functionality, but it will make your code more difficult to read, more complex, may lead to new errors and require tons of additional tests just to cover the functionality that, as you know will be available in a future release.
Instead, you can use this pad and use these new methods, using the fact that this fix / functionality will be compatible after the upgrade, as you are already using methods that are known to be available in the next specification. And there is an additional reason: since these methods are native to the specification of the next language, there is a high probability that they will work faster than any implementation that you could do if you tried to create your own version.
Another real-world scenario where this approach is welcome is at the browser level. Let's say you need support for an old browser and want to take advantage of these new features. Javascript is a language that allows you to add / change methods in its main objects (for example, add methods to the Array prototype), and these shim libraries are smart enough to add such methods only if they are not in the current implementation.
PS: 1) You will see the term "Polyfill" associated with these Javascript pads. Polyfill is a more specialized type of gasket that is used to provide direct compatibility across various browser-level specifications. By the way, my example above refers to just such an example.
2) Gaskets are not limited to this example (adding functionality that will be available in a future release). There are various use cases that are also considered gaskets.
3) If you are interested in how this particular polyfilm is implemented, you can open the Javascript Array.find specifications and scroll to the bottom of the page where you will find the canonical implementation for this method.