Taken from https://github.com/iancoleman/orderedmap/
